Merge pull request #643 from aryeh/allow_unknown_status_codes

Allow unknown status codes
This commit is contained in:
Raphael Deem 2017-04-16 18:42:59 -07:00 committed by GitHub
commit f6d4a06661

View File

@ -210,7 +210,7 @@ class HTTPResponse(BaseHTTPResponse):
# Speeds up response rate 6% over pulling from all
status = COMMON_STATUS_CODES.get(self.status)
if not status:
status = ALL_STATUS_CODES.get(self.status)
status = ALL_STATUS_CODES.get(self.status, b'UNKNOWN RESPONSE')
return (b'HTTP/%b %d %b\r\n'
b'Connection: %b\r\n'