Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Incomplete
-
Affects Version/s: JRuby 1.1.1
-
Fix Version/s: None
-
Component/s: Rails WAR Deployment
-
Labels:None
-
Environment:Tomcat 5.5.26, JRuby 1.1RC3 and JRuby 1.1.1, Goldspike 1.6, Rails 2.0.2 ... Also, this occurs with the Catalina that comes packaged with JBoss AS 4.2.2
-
Number of attachments :
Description
When you have the RequestDumperValve enabled in your server.xml on Tomcat, the body of any HTTP method that takes a body (POST, etc), is empty
If you do a $stdin.eof? in the constructor of cgi_process.rb, you will see that it returns true when the RequestDumperValve is enabled, and false when it's not
This will raise an exception in your rails log file:
/Unable to render embedded object: File (\ FAILSAFE /) not found.\ Wed May 07 11:05:36 -0400 2008
Status: 500 Internal Server Error
undefined method `[]' for nil:NilClass
C:/Temp/apache-tomcat-5.5.26/webapps/fredo/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/request.rb:470:in `clean_up_ajax_request_body!'
C:/Temp/apache-tomcat-5.5.26/webapps/fredo/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/request.rb:389:in `parse_formatted_request_parameters'
C:/Temp/apache-tomcat-5.5.26/webapps/fredo/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/cgi_process.rb:86:in `request_parameters'
C:/Temp/apache-tomcat-5.5.26/webapps/fredo/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/request.rb:296:in `parameters'
C:/Temp/apache-tomcat-5.5.26/webapps/fredo/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/request.rb:22:in `request_method'
C:/Temp/apache-tomcat-5.5.26/webapps/fredo/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/request.rb:35:in `method'
C:/Temp/apache-tomcat-5.5.26/webapps/fredo/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/routing.rb:1483:in `extract_request_environment'
C:/Temp/apache-tomcat-5.5.26/webapps/fredo/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/routing.rb:1424:in `recognize'
C:/Temp/apache-tomcat-5.5.26/webapps/fredo/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:170:in `handle_request'
C:/Temp/apache-tomcat-5.5.26/webapps/fredo/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:115:in `dispatch'
C:/Temp/apache-tomcat-5.5.26/webapps/fredo/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:126:in `dispatch_cgi'
C:/Temp/apache-tomcat-5.5.26/webapps/fredo/WEB-INF/gems/gems/actionpack-2.0.2/lib/action_controller/dispatcher.rb:9:in `dispatch'
:1
I have modified method 'parse_formatted_request_parameters' of class 'ActionController::AbstractRequest '(in actionpack 2.1.0, ...\action_controller\request.rb)
With this code:
With RequestDumperValve disabled, everything works fine. The Result in my console-window looks as expected:
Now, I have enabled the RequestDumperValve... the result was:
two things have changed: first, the body is nil; second, the method seems to be called twice!?
Whatever I've tried in method 'raw_post' - I wasn't able to read the data...
btw. this problem is not specific to RequestDumperValve, but also occures with any valve... im my sample the 'invoke' method of my valve looks loike that:
And... i've a second web-app deployed on this server, using plain old java with struts actions, and this webapp also works fine!
ps: i work with JRuby 1.1.2; Rails 2.1.0; Goldspike 1.6.1;