httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Dessent <br...@dessent.net>
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 intro3.pl
>     #!/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 CGI.pm 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
CGI.pm.

Brian

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message