respond_to issue in IE7

Hi all,

can somebody help me with this issue in respond_to?

  def new     respond_to do |format|       format.xml { puts 'xml'}       format.html { puts 'html'}       format.pdf { puts 'pdf'}       format.js { puts 'js'}     end   end

When i run this code in FireFox i am getting "html" for puts, but if i run the same code in IE7 then i am getting "xml" as puts. If i change the above code as

  def new     respond_to do |format|       format.pdf { puts 'pdf'}       format.html { puts 'html'}       format.xml { puts 'xml'}       format.js { puts 'js'}     end   end

and when i run it in FireFox i am getting the same "html" as puts but in IE7 i am getting "pdf" as puts.

The expected o/p in both the browser is "html". In FireFox i am getting the right o/p but not in IE7. IE7 is printing the one which is given in the first line. How to over come this?

Thanks, shanmu

This is a known issue with IE sending an incorrect Accepts: header. See also this:

http://www.danielcadenas.com/2008/10/internet-explorer-7-accept-header-and.html

--Matt Jones