views:

15

answers:

1

I have a old-stupid service making request to my app that fails when the Content-Type include the charset line

Content-Type text/html; charset=utf-8

and I don't know how to remove it from my rails response. Every time that I override the headers forcing just the first part (Content-Type text/html) Rails adds the charset to the header...

thanks

A: 

This worked for me:

class MyController

  after_filter :remove_charset

  def remove_charset
    headers['Content-type'] = "text/html"
  end

end

If you're working on development, make sure you clear your browser's cache.

There is this method, but didn't work for me. I don't know why, it may even be a bug.

Chubas