in reply to mod_perl, IE and DWIM

IE can be a real pain in situations like this, but I would guess that you are doing something wrong somewhere...

Have a read of "MIME Type Detection in Internet Explorer" for a primer on how IE figures out the content type.

In there you can see that Microsoft is trying to make up for mistakes that web developers and server administrators sometimes make. Of course if they would just follow the rules instead, then maybe these web developers would learn something instead. Instead, they frustrate developers who do actually know what they are doing.

Back to your problem. Is it possible that you are not returning the content type of text/html? Is your HTML document not properly formatted (does it start with <HTML> or a proper doctype? Or are you returning image data and leaving the content type as text/html? Try a very simple example that you know is correct and see what results you get.

#!/usr/bin/perl use CGI qw/:standard/; print header, start_html('Hello World!'), h1('Hello World!'), end_html;

- Cees

Replies are listed 'Best First'.
Re: Re: mod_perl, IE and DWIM
by hsmyers (Canon) on Jul 20, 2003 at 20:37 UTC
    Same file with different extension (.pl changed to .plx) works as expected, so the problem doesn't seem to be the content of the file, just what it's called! Here is one of the test programs from Practical Mod_Perl
    #!/perl/bin/perl # # mod_perl_rules1.pl use strict; use warnings; use diagnostics; print "Content-type: text/plain\n\n"; print "mod_perl rules!\n";
    which runs as a .plx, but not as a .pl!

    --hsm

    "Never try to teach a pig to sing...it wastes your time and it annoys the pig."
      Just for fun: could you try with the extension .nl ?

      The reason why I'm asking this, is that .pl is also the tld for Poland, and is also used as an identifier for Polish as a language, so there may be an issue with Content-Negotiation. If .nl gives the same problem, then it's probably related to that. If not, ask Bill. ;-)

      Liz

        Works fine!

        --hsm

        "Never try to teach a pig to sing...it wastes your time and it annoys the pig."