Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Passing more then 100 arguments to ColdFusion function throws an error

There is a ColdFusion function where we have to pass more then 100 arguments to get a search result. When passing these 100 odd parameters into the function, ColdFusion throws the error: "404 not found"

I tried to increase post size Limit in CF server settings from 100 to 300 but am still getting the error.

like image 856
Sks Avatar asked Oct 13 '13 17:10

Sks


2 Answers

Increasing the "post size limit" only changes how many megabytes can be received, not the quantity.

For that, you need to increase the "post parameters limit" in neo-runtime.xml, by adding* or updating the XML node:

<var name='postParametersLimit'><number>300.0</number></var>

Then save the file and restart the ColdFusion server for the changes to take effect.

* If the 'postParametersLimit' field is not present, you can insert it immediately before <var name='postSizeLimit'> - whilst it's not mandatory to place it there specifically, this is a simple way to ensure it does not get nested invalidly.

Note that this affects the number of form fields (i.e. HTTP POST parameters) being submitted - not the number of arguments to a function, but this is presumably your problem because the latter should not cause a 404 error.

like image 74
Peter Boughton Avatar answered Nov 02 '22 17:11

Peter Boughton


In ColdFusion 10, the post parameters limit is a setting in the Administrator:

Server Settings / Settings / Request Size Limits / Maximum number of POST request parameters

This setting defaults to 100.

Increase it to the required amount of parameters required to be accepted. (We just had to increase ours to 300!)

like image 45
Gavin Baumanis Avatar answered Nov 02 '22 15:11

Gavin Baumanis