Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: IO::Socket, Multiple GET.

by jhourcle (Prior)
on Jul 02, 2009 at 14:26 UTC ( #776760=note: print w/ replies, xml ) Need Help??


in reply to IO::Socket, Multiple GET.

$msg = "GET /engine3.php?req_sale=5205&page=1\r\n";

You're sending HTTP/0.9, which doesn't have provisions for persistent connections, and the server will always disconnect you. You need to either send an HTTP/1.1 request, or HTTP/1.0 with the appropriate headers ... and for that, I'd do as poolpi and our anonymous friend have already mentioned, and use LWP::UserAgent (search the instructions for 'keep_alive' ).


Comment on Re: IO::Socket, Multiple GET.
Re^2: IO::Socket, Multiple GET.
by ikegami (Pope) on Jul 02, 2009 at 16:58 UTC

    You need to either send an HTTP/1.1 request, or HTTP/1.0 with the appropriate headers

    • HTTP/1.1 does not automatically keep the connection open. An appropriate Keep-Alive header must be sent.

    • Keep-Alive was introduced in HTTP/1.1. HTTP/1.0 does not support keeping the connection open.

      However, since Keep-Alive is compatible with HTTP/1.0, many servers that claim to be HTTP/1.0 support Keep-Alive. This was the cases even when HTTP/1.1 was still a draft.

    • Finally, servers are under no requirement to honour Keep-Alive requests.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://776760]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2014-07-24 04:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (157 votes), past polls