http://www.perlmonks.org?node_id=958027


in reply to Inconsistent Perl code in Internet Explorer 8

The code in question is

Nope, that ain't the code, its only a fragment, and it doesn't deal with printing headers.

See code/links in Re: Perl/CGI Uploading file to the server using a upload hook is failing intermittently and don't let users assign filename, store it as metadata or escape/encode it :)

You can use DebugCGI for debugging

Work through these checklists CGI Help Guide and Troubleshooting Perl CGI scripts, they have gems like "check the logs", "keep your own logs" ...

  • Comment on Re: Inconsistent Perl code in Internet Explorer 8

Replies are listed 'Best First'.
Re^2: Inconsistent Perl code in Internet Explorer 8
by ThePole (Initiate) on Mar 06, 2012 at 07:38 UTC

    Dear Sirs, thank you for your reply.

    I am actually a VB/Java programmer, so am very new to Perl. This code was done by a friend, but he insists that there is nothing wrong, since other users are working. But if that is the case, then it shouldn't have the error in Fiddler. I am really at wits end for this.

    By the way, how does code printing headers looks like?

      This code was done by a friend, but he insists that there is nothing wrong,

      Well, aside from the notes by JavaFan, the code is broken. It makes assumptions about the value of $data, and the big mistake, it trusts the user not to be malicious. The value of $data can vary from browser to browser. My first link and the links it links, deal with this in some detail. Read it.

      By the way, how does code printing headers looks like?

      Read my links, there are at least 3 examples, and they all contain the word "header"

        This example prints a header, and doesn't include the word "header":

        print "Content-Type: text/html\r\n\r\n";

      If your friend thinks this is good Perl code, then you might want to get a new Perl programmer (or a new friend).

      Aaron B.
      My Woefully Neglected Blog, where I occasionally mention Perl.