HTTP 1.1 pipelining

N

noviceUser

can some one guide me how to use HTTP 1.1 pipelining in Python.

Client will generate 3 get requests continuously as shown below and
then read the response for each GET request.

Algorithm
----------
GET(ur1_l)
GET(url_2)
GET(url_3)
readResponse(url_1)
readResponse(url_2)
readResponse(url_3)

i m a python newbie and pls forgive me if this question sounds silly.
thanks in advance for any help.
 
I

Ivan Voras

noviceUser said:
can some one guide me how to use HTTP 1.1 pipelining in Python.

Client will generate 3 get requests continuously as shown below and
then read the response for each GET request.

Algorithm
----------
GET(ur1_l)
GET(url_2)
GET(url_3)
readResponse(url_1)
readResponse(url_2)
readResponse(url_3)

I don't think this is how HTTP/1.1 pipelining works. It is still a
request-response protocol - the only "pipelining" is in the fact that it
doesn't require a separate connection session for each request-response
pair. That is:

HTTP/1.0:
<establish connection>
GET(url_1)
readResponse(url_1)
<close connection>
<establish connection>
GET(url_2)
readResponse(url_2)
<close connection>
<establish connection>
GET(url_3)
readResponse(url_3)
<close connection>

HTTP/1.1:
<establish connection>
GET(url_1)
readResponse(url_1)
GET(url_2)
readResponse(url_2)
GET(url_3)
readResponse(url_3)
<close connection>

Or maybe you are thinking of establishing parallel connections? In that
case look for some examples using threads and sockets...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top