Commits

Remi Delon  committed 7e72621

Fixed small bug in HTTP server

  • Participants
  • Parent commits b1d326d
  • Branches cherrypy

Comments (0)

Files changed (2)

File _cphttpserver.py

         )
 
         self.connection = self.request
-        self.rfile = CherrySSLFileObject(self.connection, 'rb', self.rbufsize)
-        self.wfile = CherrySSLFileObject(self.connection, 'wb', self.wbufsize)
 
     def log_message(self, format, *args):
         """ We have to override this to use our own logging mechanism """

File _cphttptools.py

             if cpg.request.headerMap.has_key('If-Modified-Since'):
                 # Check if if-modified-since date is the same as strModifTime
                 if cpg.request.headerMap['If-Modified-Since'] == strModifTime:
-                    cpg.response.headerMap = {'Status': 304, 'protocolVersion': cpg.configOption.protocolVersion, 'Date': date}
+                    cpg.response.headerMap = {'Status': 304, 'protocolVersion': cpg.configOption.protocolVersion, 'Date': cpg.response.headerMap['Date']}
                     cpg.response.body = ''
                     sendResponse(wfile)
                     return