L
Lars Oeschey
Hi,
I have a bit of a problem with the behaviour of HTTP:aemon
my code looks like this:
------------------------------------------------------------
my $http = HTTP:aemon->new ( LocalPort => 82);
print $http->url;
while (my $connect = $http->accept) {
$request=$connect->get_request;
if ($request->method eq "GET") {
$connect->send_response($html);
}
elsif ($request->method eq "POST") {
$connect->send_response($working);
&Action;
$connect->send_response($done);
}
}
$connect->close;
undef $connect;
sub Action {
print "Gruss von der Sub!\n";
sleep 20;
}
---------------------------------------------------------------
$html, $working and $done are html pages as string. $html displays a
button with method "post". The first page with the button gets
displayed fine, when I click on the button, there's a 20sec delay, and
then $working and $done get displayed at once. Is there a way to have
the delay actually happen between $working and $done? Is this some
buffering problem? Another Question: On every page I get a status line
displayed:
Date: Mon, 26 Jan 2004 21:30:25 GMT Server: libwww-perl-daemon/1.25
how can I switch that off?
Lars
I have a bit of a problem with the behaviour of HTTP:aemon
my code looks like this:
------------------------------------------------------------
my $http = HTTP:aemon->new ( LocalPort => 82);
print $http->url;
while (my $connect = $http->accept) {
$request=$connect->get_request;
if ($request->method eq "GET") {
$connect->send_response($html);
}
elsif ($request->method eq "POST") {
$connect->send_response($working);
&Action;
$connect->send_response($done);
}
}
$connect->close;
undef $connect;
sub Action {
print "Gruss von der Sub!\n";
sleep 20;
}
---------------------------------------------------------------
$html, $working and $done are html pages as string. $html displays a
button with method "post". The first page with the button gets
displayed fine, when I click on the button, there's a 20sec delay, and
then $working and $done get displayed at once. Is there a way to have
the delay actually happen between $working and $done? Is this some
buffering problem? Another Question: On every page I get a status line
displayed:
Date: Mon, 26 Jan 2004 21:30:25 GMT Server: libwww-perl-daemon/1.25
how can I switch that off?
Lars