httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Dessent <>
Subject Re: [users@httpd] Debian 3.0r1 Apache 1.3.26 cgi-bin behavior depends on script name and browser (?)
Date Wed, 01 Oct 2003 00:14:36 GMT
David Christensen wrote:

> And here is one that Mozilla attempts to download, while IE says "The
> page cannot be found":
>     dpchrist@d3020g:~/public_html/cgi-bin:CVS> cat
>     #!/usr/bin/perl -w
>     use strict;
>     print "Content-Type: text/html\n\n";
>     print <<END;
>     <html>
>     <head><title>My Page Title</title></head>
>     <body><p>My page body</p></body>
>     </html>
>     END
>     exit(0);

You need to use \r\n for line endings in the HTTP headers, not \n.

This is exactly the sort of reason why you should always use and
not try to handle HTTP headers, forms, encoding, etc. with code that
your write.  It's almost guaranteed that there is always some minor
thing that will break "home brewed" scripts that is handled properly by


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message