develooper Front page | perl.libwww | Postings from April 2003

Connection: close -- and LWP::RobotUA

Thread Next
From:
Bill Moseley
Date:
April 12, 2003 23:01
Subject:
Connection: close -- and LWP::RobotUA
Message ID:
Pine.LNX.4.10.10304122245190.15788-100000@mardy.hank.org

I use LWP::RobotUA and use a delay.  But I'm thinking about setting the
delay to zero for the *next* request when using keep-alives and not seeing
the Connection: close response header.  Why delay if the server is waiting
for your next request?

So, two questions:

First, I'm not clear after trying to read the RFCs if I can depend on a
Connection: close header from an older server (< HTTP/1.1).  Can I assume
that the lack of that response header indicates the connection is not
closed?  Or is there a better way to determine if the connection was
closed after a request?

Second, do you agree that it make sense to not delay if the connection is
not closed? If the point of the delay is to reduce load on the server
then delaying when using keep-alives possibly could be making things worse
since the delay might force the connection to time out -- or just sit
there waiting.

And if it does make sense, should LWP::RobotUA track the last response and
not wait if the connection is already open?

Thanks,

-- 
Bill Moseley moseley@hank.org


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About