Thanks! I've found out a work-around now:
With perl nph scrips (non-parsed headers) I can send any header. I tried that but missed that the actual script name needs to be called nph-xxxx.pl
Then it's just to print the full header to stdout and I can write whatever I like, including *not* writing the Connection: close
So case closed. In php, it appears to be not
possible though.
Excellent tool for debugging http headers:
cg-eye And here's the perl source for my nph script:
nph-gif.pl
code:
#!/usr/bin/perl
$file = "./pics/test.gif";
$server_protocol = $ENV{'SERVER_PROTOCOL'};
$server_software = $ENV{'SERVER_SOFTWARE'};
print "$server_protocol 200 OK", "\n";
print "Server: $server_software", "\n";
print "Date: Mon, 15 Jul 2002 10:20:49 GMT\n";
print "Accept-Ranges: bytes\n";
print "Content-type: image/gif\n";
print "Content-Length: 2650\n";
print "Last-Modified: Fri, 28 Jun 2002 20:04:24 GMT\n";
print "Set-Cookie: server=1\n";
print "\n";
binmode(STDOUT);
open(IMAGE, "<$file") || die "Can't open $file: $!";
while (<IMAGE>)
{
print $_;
}
close(IMAGE);
exit (0);