Hi libwww gurus,
I was hoping someone could help me with a problem im having with
HTTP:Daemon. Here is the platform:
$Id: Daemon.pm,v 1.21 1999/03/20 07:37:35 gisle Exp $
SunOS 5.7 Generic_106541-10 sun4u sparc
This is perl, version 5.005_03 built for sun4-solaris
The problem is that HTTP::Daemon dies fatally without any error messages
in the send_basic_header method. I managed to track down the offending
line by putting in some crude debugging (since I'm not very good with
the perl debugger).. here is the method from HTTP::Daemon that I marked up:
sub send_basic_header
{
my $self = shift;
return if $self->antique_client;
$self->send_status_line(@_);
print $self "Date: ", time2str(time), $CRLF;
my $product = $self->daemon->product_tokens;
print $self "Server: $product$CRLF" if $product;
}
I have to admit that I am unfamiliar with the whole concept of printing
to an object...IO::Handle, which the superclass of IO::Socket, which I think is
in turn the superclass of HTTP::Daemon has a print() method, but
I dont think it is getting used here.
Anyway, here is my temporary version:
sub send_basic_header
{
my $self = shift;
return if $self->antique_client;
print "SBH_1 ",@_,"\n";
$self->send_status_line(@_); print "SBH_1BB \n"; print "SBH_1B \n";
print "SBH_1BA ","Date: ", time2str(time);
print "SBH_1BB \n";
print $self "Date: ", time2str(time), $CRLF || print "ERROR $!";
print "SBH_2 \n";
my $product = $self->daemon->product_tokens;
print "SBH_3 \n";
print $self "Server: $product$CRLF" if $product;
print "SBH_4 \n";
}
this is what comes out:
SBH_1 200
SBH_1B
SBH_1BA Date: Fri, 30 Jun 2000 18:34:11 GMT
SBH_1BB
then it dies fatally. Does anyone know what this could be? I've tried
everything i can think, of, including trying to trap the error with eval,
but no dice. Thanks in advance!
Max
P.S. STDOUT is autoflushed.