This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author martin.panter
Recipients demian.brecht, martin.panter, pitrou
Date 2015-04-12.03:02:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1428807740.82.0.977350952999.issue23377@psf.upfronthosting.co.za>
In-reply-to
Content
HTTP pipelining is not supported in general. According to the module doc string, you can actually pipeline a second request if you have read the first response’s headers but not its body:

>>> conn = HTTPSConnection("bugs.python.org")
>>> conn.request("GET", "/")
>>> response1 = conn.getresponse()  # Read header section only
>>> conn.request("GET", "/issue23377")
>>> response1.read()[:100]  # Read first body after pipelining second request
b'<!--\n This is the default body that is displayed when people visit the\n tracker. The tag below lists'
>>> response2 = conn.getresponse()
>>> response2.read()[:100]
b'\n<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xht'

But I suspect this might deadlock with some servers (that don’t properly support pipelining themselves) if the second request was a large POST or something and filled up the buffers that this mode relies on.
History
Date User Action Args
2015-04-12 03:02:20martin.pantersetrecipients: + martin.panter, pitrou, demian.brecht
2015-04-12 03:02:20martin.pantersetmessageid: <1428807740.82.0.977350952999.issue23377@psf.upfronthosting.co.za>
2015-04-12 03:02:20martin.panterlinkissue23377 messages
2015-04-12 03:02:20martin.pantercreate