Images in themes are not rendered correctly
Bug #145255 reported by
JW
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Chameleon (inactive) |
Fix Released
|
Medium
|
JW |
Bug Description
In some installations of Chameleon, images in the theme are not loaded correctly when loaded using the URL http://
This bug is not always reproducable, and various things can happen instead of the expected action:
- The image may not be rendered at all, and sometimes can cause the server to crash (this happened to me using Rails 1.2 and Mongrel).
- The image can be rendered as gibberish (the image is interpreted as plain text instead of as an image).
This bug happens because Chameleon and Rails don't always send the correct MIME type in the HTTP header Content-Type. Either Rails or the webserver add a Content-Type themselves, which often is text/html.
Changed in chameleon: | |
milestone: | 0.6.2 → 0.6.1.2 |
Changed in chameleon: | |
milestone: | 0.6.1.2 → 0.6.2 |
Changed in chameleon: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
This bug is fixed in Chameleon 0.6.2 (currently, the fix is not in the trunk yet, but still in the rails-1-2 branch).
Instead of the render() function we used previously, we now use send_file(), which is designed to send binary files to the browser, of any type.