This project is archived and is in readonly mode.
'use ActionController::VerbPiggybacking' brakes multipart forms with Passenger
-
josh
- Milestone cleared.
- State changed from new to open
- Assigned user set to josh
This is a critical bug and I want to get it fixed ASAP. I just need a little bit more information. Is there anyway you can put together a unit test case?
-
Bence Nagy
Sorry I can not say more closer. It works if I delete 'req.parameters[:_method]' in verb_piggybacking.rb (line: #13 Allow SEO friendly resources (ex. /my-resources)), so it fails at Request.parameters. And I do not know how to write and run a test under Passenger...
-
Suave Su
I met the same issue with rails edge & passenger, but work very well under mongrel at my localhost
-
josh
- Tag changed from passenger to multipart, rack
Added a test to prove this bug: http://github.com/rails/rails/co...
I still don't have a solid fix yet.
-
Florian Aßmann
I assume the Body got read once and since it's an UnixSocket on some systems this renders the whole POST body invalid (no .rewind) when ActionController tries to dispatch.
/Users/florian/dev/farmfacts/vendor/rails/actionpack/lib/action_controller/request_parser.rb:303:in `read_multipart' /Users/florian/dev/farmfacts/vendor/rails/actionpack/lib/action_controller/request_parser.rb:153:in `parse_multipart_form_parameters' /Users/florian/dev/farmfacts/vendor/rails/actionpack/lib/action_controller/request_parser.rb:67:in `parse_formatted_request_parameters' /Users/florian/dev/farmfacts/vendor/rails/actionpack/lib/action_controller/request_parser.rb:8:in `request_parameters' /Users/florian/dev/farmfacts/vendor/rails/actionpack/lib/action_controller/request.rb:438:in `request_parameters' /Users/florian/dev/farmfacts/vendor/rails/actionpack/lib/action_controller/request.rb:397:in `parameters' /Users/florian/dev/farmfacts/vendor/rails/actionpack/lib/action_controller/verb_piggybacking.rb:15:in `call' -
Florian Aßmann
I got a MethodNotAllowed from ActionController::Routing::RouteSet[64] so I learning some more Rails internals where I found something far away from VerbPiggybacking.
polymorphic_path currently generates wrong paths, imho:
create_path = polymorphic_path [:admin, record, record.attachments.new]
Before: /admin/articles/2/attachments
After: /admin/articles/2
Well, when an exception is raised at this point the @env got lost somehow in ActionController::Dispatcher[66] and I must correct my habit to first look into the log where, in this case, no information about the requested url can be found, but to look in the browser address bar.
Now I'll try to get @env inplace...
-
Florian Aßmann
Ok, I extended the global rescue hack to get the response back in place.
-
Florian Aßmann
polymorphic_path works correctly
-
Florian Aßmann
The problem with the already read body still exists:
/!\ FAILSAFE /!\ Sun Jan 04 16:24:33 +0100 2009 Status: 500 Internal Server Error no content body /var/www/vendor/rails/actionpack/lib/action_controller/request_parser.rb:225:in `read_multipart' /var/www/vendor/rails/actionpack/lib/action_controller/request_parser.rb:153:in `parse_multipart_form_parameters' /var/www/vendor/rails/actionpack/lib/action_controller/request_parser.rb:67:in `parse_formatted_request_parameters' /var/www/vendor/rails/actionpack/lib/action_controller/request_parser.rb:8:in `request_parameters' /var/www/vendor/rails/actionpack/lib/action_controller/request.rb:438:in `request_parameters' /var/www/vendor/rails/actionpack/lib/action_controller/request.rb:397:in `parameters' /var/www/vendor/rails/actionpack/lib/action_controller/base.rb:1221:in `assign_shortcuts' /var/www/vendor/rails/actionpack/lib/action_controller/base.rb:521:in `process_without_filters' /var/www/vendor/rails/actionpack/lib/action_controller/filters.rb:606:in `sass_old_process' /var/www/vendor/gems/haml-2.0.6/rails/../lib/sass/plugin/rails.rb:19:in `process' /var/www/vendor/rails/actionpack/lib/action_controller/rescue.rb:65:in `call_with_exception' /var/www/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:66:in `dispatch' /var/www/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:86:in `_call' /var/www/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:57:in `initialize' /var/www/vendor/rails/railties/lib/rails/rack/metal.rb:32:in `call' /var/www/vendor/rails/railties/lib/rails/rack/metal.rb:32:in `call' /var/www/vendor/rails/actionpack/lib/action_controller/verb_piggybacking.rb:21:in `call' -
Repository
- State changed from open to resolved
(from [f00e86d7e9c7a4689a49fc085bcb757c5a2c0b03]) Memoize request accessors on the Rack env so other request objects have access to the same cache [#1668 'use ActionController::VerbPiggybacking' brakes multipart forms with Passenger state:resolved] http://github.com/rails/rails/co...
