This project is archived and is in readonly mode.
image_tag adds strange dot after file names on windows
-
Pratik
- Assigned user set to Pratik
-
Liam Morley (carpeliam)
- Assigned user cleared.
I just ran into this too. Because of the extra dot, the server doesn't consider 'myfile.png.?123456' to have a .png extension, and sets the content-type to 'application/octet-stream' instead of 'image/png', which means my images don't show up in some finicky mobile web browser, which makes me spend 2 hours hunting down this bug. :/
Seem like this is more of a ruby bug than a rails bug, but the rails code could afford to be little tighter.
-
Liam Morley (carpeliam)
- Assigned user set to Pratik
-
Aslak Hellesøy
This is a Windows bug actually. Try this:
IF EXIST README.txt..... echo Wind0s suX
Awesome stuff
-
Aslak Hellesøy
Some interesting links mentioning trailing dots in file names on windows:
http://www.fs-driver.org/relnote... http://osdir.com/ml/security.bug... (a 6 year old bug that they never really fixed, just worked around...)
Since Redmond will probably never fix this bug, I guess the buest fix in Rails is to avoid code like
File.exist?(File.join(ASSETS_DIR, dir, "#{source}.#{ext}"))
When ext may be nil or an empty string...
-
Pratik
- State changed from new to stale
- Tag changed from 2.1, actionpack, tested to 2.1, actionpack
-
Pratik
- State changed from stale to duplicate
- Tag changed from 2.1, actionpack to 2.1, actionpack
Fixed in http://github.com/rails/rails/co...