[Python-3000-checkins] r56713 - python/branches/py3k-struni/Lib/BaseHTTPServer.py

jeremy.hylton python-3000-checkins at python.org
Fri Aug 3 22:32:27 CEST 2007


Author: jeremy.hylton
Date: Fri Aug  3 22:32:27 2007
New Revision: 56713

Modified:
   python/branches/py3k-struni/Lib/BaseHTTPServer.py
Log:
Treat HTTP status line as ISO-8859-1 as in httplib module.


Modified: python/branches/py3k-struni/Lib/BaseHTTPServer.py
==============================================================================
--- python/branches/py3k-struni/Lib/BaseHTTPServer.py	(original)
+++ python/branches/py3k-struni/Lib/BaseHTTPServer.py	Fri Aug  3 22:32:27 2007
@@ -230,7 +230,7 @@
         self.command = None  # set in case of error on the first line
         self.request_version = version = "HTTP/0.9" # Default
         self.close_connection = 1
-        requestline = self.raw_requestline
+        requestline = str(self.raw_requestline, 'iso-8859-1')
         if requestline[-2:] == '\r\n':
             requestline = requestline[:-2]
         elif requestline[-1:] == '\n':


More information about the Python-3000-checkins mailing list