httplib and '100 Continue' after POST 
Author Message
 httplib and '100 Continue' after POST

I can't figure out how to persuade httplib to handle a response status of
'100 Continue'.  Has anyone accomplished this?

--
Doug Fort
Senior Meat Manager
Downright Software
http://www.*-*-*.com/ ~dougfort



Wed, 18 Jun 2003 18:23:48 GMT  
 httplib and '100 Continue' after POST
I believe there is a bug in httplib (I'll send a report to ActiveState,
where I got my distro).

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


Quote:
> I can't figure out how to persuade httplib to handle a response status of
> '100 Continue'.  Has anyone accomplished this?

> --
> Doug Fort
> Senior Meat Manager
> Downright Software
> http://www.dougfort.com/~dougfort



Wed, 18 Jun 2003 20:39:47 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Question about httplib and HTTP response 100 Continue

2. new httplib and 100 continue error

3. HTTPLib and POST problem with '?'

4. '20' <= 100

5. HTTPLib and POST problem ["100 continue" problem redux?]

6. Continuation after 100 header in httplib

7. httplib 'getaddrinfo failed'

8. httplib 'getaddrinfo failed'

9. Clipper Summer'87 cpu load 100%

10. What's happening with my P-100?

11. Generating 100's of Objects

12. Continuing problems with 'grid'

 

 
Powered by phpBB® Forum Software