Skip to content

Instantly share code, notes, and snippets.

@webwarelab
Created April 7, 2010 17:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save webwarelab/359176 to your computer and use it in GitHub Desktop.
Save webwarelab/359176 to your computer and use it in GitHub Desktop.
# Fix faulty request format of IE
class ActionController::Request
def accepts_with_faulty_header
@env['HTTP_ACCEPT'] = '*/*' if @env['HTTP_USER_AGENT'] =~ /msie/i and @env['HTTP_USER_AGENT'] !~ /opera|webtv/i
accepts_without_faulty_header
end
alias_method_chain :accepts, :faulty_header
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment