HTTP/1.1 BaseHTTPServer 
Author Message
 HTTP/1.1 BaseHTTPServer

Quote:
>is an (updated) version of the BaseHTTPServer class out there
>which handles HTTP/1.1 ?

I reported this to Guido quite a while ago, and he came up with
the attached patches.

Cheers /F

RCS file: /projects/cvsroot/python/dist/src/Lib/BaseHTTPServer.py,v
retrieving revision 1.2
diff -c -r1.2 BaseHTTPServer.py
*** BaseHTTPServer.py 1996/02/12 23:58:38 1.2
--- BaseHTTPServer.py 1997/08/04 22:09:11
***************
*** 236,242 ****
  words = string.split(requestline)
  if len(words) == 3:
      [command, path, version] = words
!     if version != self.protocol_version:
  self.send_error(400, "Bad request version (%s)" % `version`)
  return
  elif len(words) == 2:
--- 236,242 ----
  words = string.split(requestline)
  if len(words) == 3:
      [command, path, version] = words
!     if version[:5] != 'HTTP/':
  self.send_error(400, "Bad request version (%s)" % `version`)
  return
  elif len(words) == 2:
***************
*** 297,303 ****
  self.log_request(code)
  if message is None:
      if self.responses.has_key(code):
! message = self.responses[code][1]
      else:
  message = ''
  if self.request_version != 'HTTP/0.9':
--- 297,303 ----
  self.log_request(code)
  if message is None:
      if self.responses.has_key(code):
! message = self.responses[code][0]
      else:
  message = ''
  if self.request_version != 'HTTP/0.9':



Sun, 16 Apr 2000 03:00:00 GMT  
 HTTP/1.1 BaseHTTPServer

Hi,

is an (updated) version of the BaseHTTPServer class out there
which handles HTTP/1.1 ?

Thanks in advance

--
Stefan Dupont-Christ



Sun, 16 Apr 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. HTTP 1.1 support in BaseHTTPServer [patch 430706]

2. HTTP 1.0 and HTTP 1.1 packages

3. HTTP/1.1 server in Python

4. HTTP 1.1 anyone?

5. httplib supporting HTTP/1.1 [Q]

6. HTTP/1.1 module

7. HTTP/1.1 support in 1.5?

8. python 1.4 and HTTP/1.1

9. urllib HTTP/1.1 patch

10. httplib.py fixed for HTTP/1.1?

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

12. bug in httplib for HTTP/1.1 responses

 

 
Powered by phpBB® Forum Software