Hi, here's a way to reproduce this bug:

Start bozohttpd with cgi support for perl:
bozohttpd -C .pl /usr/bin/perl
Host the following perl script:
______/foo.pl_____________
#!/usr/bin/perl -w

use strict;

print <<"EOF";
Content-type: text/plain

Hello, World!
EOF
^^^^^^^^^^^^^^^^^^^^^^^^^^
Notice the empty line between the 'Content-type: text/plain' and the
'Hello, World!'.
Now access the script using telnet or netcat:

$ echo "GET /blub.pl HTTP/1.0\n" |nc madroach.dyndns.org 80

As result you will get:

__________________________
HTTP/1.0 200 OK
Content-type: text/plain
Hallo, Welt!
^^^^^^^^^^^^^^^^^^^^^^^^^^

Notice that the empty line is gone.
A browser will falsely interpret the content of a generated page up to
the first empty line as part of the HTTP header.

Regards, 
Christopher


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to