in reply to Re^3: Content-Disposition... odd behavior in IE
in thread Content-Disposition... odd behavior in IE

Perhaps capitalization matters?

Capitalisation is not suppose to matter for HTTP header names (but you never know), and you already rely on the case-insensitivity (by using "Content-type" instead of "Content-Type").

  • Comment on Re^4: Content-Disposition... odd behavior in IE

Replies are listed 'Best First'.
Re^5: Content-Disposition... odd behavior in IE
by tilly (Archbishop) on Jan 14, 2009 at 19:04 UTC
    Ah. I was just copying an example from somewhere.

    Really my experience with this kind of problem is that you keep trying variations that have worked for someone else and hopefully one of them finally does the trick.

    Glancing at some code I have lying around the following definitely works with many people's copies of IE:

    #! /usr/bin/perl -w use strict; use CGI; print CGI->header( -type => "application/vnd.ms-excel", -attachment => "example.xls", ); print "Salutation\tRecipient\nHello\tWorld\nGreetings\tEarthlings\n";
    So if that doesn't work I can guarantee that the problem is specific to his copy of IE, and is not shared by IE in general.
      I just tested this on a few machines and works on some but not others.

      I agree 100% the problem is specific to a copy of IE (mine or otherwise). But, at best it's a crap shoot and I need more reliability than that.