[Python-bugs-list] [Bug #127361] httplib problem with '100 Continue'

noreply@sourceforge.net noreply@sourceforge.net
Wed, 03 Jan 2001 03:50:57 -0800


Bug #127361, was updated on 2001-Jan-02 18:14
Here is a current snapshot of the bug.

Project: Python
Category: Python Library
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Submitted by: dougfort
Assigned to : jhylton
Summary: httplib problem with '100 Continue'

Details: I believe there is a bug in httplib 

IIS 4 and 5 are subject to send an unsolicited result code of '100
Continue' with a couple of headers and a blank line before sending '302
Object Moved'.

The 100 response is totally worthless and should be ignored. 
Unfortunately, httplib.HTTPConnection is unwilling to go back and read more
headers when it
already has a response object.

I was able to get past this with the following kludge:

    while 1:
        response = self._client.getresponse()
        if response.status != 100:
            break
        # 2000-12-30 djf -- drop bogus 100 response
        # by kludging httplib
        self._client._HTTPConnection__state = httplib._CS_REQ_SENT
        self._client._HTTPConnection__response = None



For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=127361&group_id=5470