bug in httplib for HTTP/1.1 responses 
Author Message
 bug in httplib for HTTP/1.1 responses


Perhaps this has already been fixed, but in python1.4's httplib.py the
server response regexp has an HTTP/1.0 hard-coded into it

    replypat = regsub.gsub('\\.', '\\\\.', HTTP_VERSION) .......

The regexp needs to match something like HTTP/1\.[0-9]+

Hard-coding 1.0 causes problems with new HTTP/1.1 servers. e.g. point
Grail at http://www.*-*-*.com/
Apache using HTTP/1.1, and you see headers appearing in the body.

HTTP can(should) be upward compatible between minor versions.
According to the Apache developers the spec says an HTTP/1.1 response
is valid for an HTTP/1.0 request (the client should just ignore any
new fields in the header). Other browsers I tested handle 1.1 ok.

Hope this reaches the right people. I don't use python at the moment
and I didn't find a python-bugs email address in the faq. Maybe
somebody can let me know where it should go if this is the wrong

best regards
Brian Gough

[ For information about TeX, see http://www.*-*-*.com/ ]

Mon, 17 May 1999 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. httplib supporting HTTP/1.1 [Q]

2. httplib.py fixed for HTTP/1.1?

3. FAQ: Patch for HTTP/1.1 in httplib...

4. Question about httplib and HTTP response 100 Continue

5. httplib: response.read() vs response.read(size)

6. HTTP 1.0 and HTTP 1.1 packages

7. httplib 1.1

8. HTTP 1.1 support in BaseHTTPServer [patch 430706]

9. HTTP/1.1 server in Python

10. HTTP 1.1 anyone?

11. HTTP/1.1 module

12. HTTP/1.1 support in 1.5?


Powered by phpBB® Forum Software