Topic: Post Data not being put into Params

I developed an application using Rails and the WeBrick, and now I've moved it to the production server using apache/fcgid.  Now, however, post data is not being populated in the params hash.  Even a simple form with one hidden field, which works fine as a GET request, does not work using POST.  The problem isn't with the form, as I've posted the data to a simple php script that just dumps the data, and it came through fine.  I read a post about a similar problem, but it was only occuring over HTTPS.  In my case, it is occuring over standard HTTP.

Does anyone have any idea why this might be happening?  Is there some apache/fcgid configuration issue that could cause this?  Thanks for any insight.

-Joey Corless

Re: Post Data not being put into Params

Is it removing everything from params or just specific fields that were sent via a form?

What is the value of params after a post request (i.e. could you post 'params.inspect' for us?)

Re: Post Data not being put into Params

I'm not able to check at the moment, but I believe it's only removing all of the data submitted through the form.  If it's helpful at all, though, earlier I did a request.raw_post to see if the form data was received at all, and it returned nothing (empty string).  As soon as I get a chance I'll do a params.inspect and post the results.  Thanks for the help.

Re: Post Data not being put into Params

The value of params is {"action"=>"test", "controller"=>"public"}.  It seems to only be removing post data.  For example, if I add "?getvar=val" to the URL of the page it's being submitted to, params is {"action"=>"test", "getvar"=>"val", "controller"=>"public"}.  The request type (request.method) is still post, though.  Any ideas?  Thanks.

Re: Post Data not being put into Params

Another small update.  I tried using mod_cgi instead of fcgid, and the result was the same.  So I don't think it's a fcgid problem.

Re: Post Data not being put into Params

I'm having this same problem. Has anyone found a solution?

It works fine with webrick, but on apache it pull the POST data. Here's a params.inspect in apache:

"action"=>"action", "controller"=>"controller"}

In webrick:

{"action"=>"action", "form"=>"Test form data", "controller"=>"controller"}

Doesn't show up at all in the raw post data at all, although I have checked with an HTTP packet sniffer to verify that it is indeed sending the POST form data.

fcgi and cgi both do this... mod_ruby perhaps?

Re: Post Data not being put into Params

Ok, so I got it working now.

I was using the Apache that came with my VPS (Centos, SWSoft compile), so what I did was a uninstalled it, along with ruby and mod_ruby then recompiled it all from scratch. Mod_ruby causes a segfault now, but rails still works fine.

I'm guessing its a problem with the Centos/SWSoft RPM.