This project is archived and is in readonly mode.
WEBrick serving files from /public produces routing error for files which have a "+" in their name
-
pnina
hi
i encountered the same problem
i just reinstall my computer and installed rails 3.0.3 and ruby 1.9.2 on windows 7 and WEBrick
when I open my application in the browser rails cannot find my JavaScript files and i am getting ActionController::routingError
I worked previously with rails 3.0 and all was fine -
Andrew White
- State changed from new to open
- Milestone set to 3.x
- Assigned user set to Andrew White
- Importance changed from to Low
This is because the '+' is getting decoded as a space by Rack::Utils.unescape in ActionDispatch::Static and Rack::File. In production mode static file serving is handled by Apache so it works fine. Rack::Utils.unescape is very basic implementation in that it doesn't take into account the context of the + symbol which is allowed unescaped in paths but is treated as a space in query parameters.
This needs fixing in both places for it to work - URI.unescape (or URI::Parser.unescape in 1.9.2) would seem to provide the necessary method.