Ticket #588: _cpwsgiserver.py_r1405_ticket588.diff
-
cherrypy/_cpwsgiserver.py
old new 45 45 'vary', 'via', 'warning', 'www-authenticate', 46 46 ] 47 47 48 # RFC 2616: These response codes MUST NOT contain a message body 49 NO_BODY_CODES = ("204", "304") 48 50 49 51 class HTTPRequest(object): 50 52 … … 323 325 and (# Request Entity Too Large. Close conn to avoid garbage. 324 326 self.status[:3] == "413" 325 327 # No Content-Length. Close conn to determine transfer-length. 326 or "content-length" not in hkeys)): 328 or ("content-length" not in hkeys and \ 329 self.status[:3] not in NO_BODY_CODES))): 327 330 if "connection" not in hkeys: 328 331 self.outheaders.append(("Connection", "close")) 329 332 self.close_connection = True

