rails/rails — pull request #8662 by senny (2012-12-30 21:55:20+00:00)
Title: Charset should not be appended to image/* type

WIP
the source issue is #8661.

I created a test case to illustrate the issue.

```
1) Failure:
test_head_created_with_image_png_content_type(RenderTest) [test/controller/render_test.rb:1238]:
Expected: "image/png"
Actual: "image/png; charset=utf-8"
```

I'm not quite sure how to solve the problem. Currently the charset is only skipped when we are sending a file using `send_file` or `send_data`. I see the following options:

1. skip the charset for all responses generated with `head`
1. inspect the content-type and only append the charset if it's necessary. (This would need some kind of white/blacklist, which could be brittle)