I literally *just* ran into this same exact problem. In our case, we want to use non-standard status codes that are outside of the http spec. Although the reason we specify gets used, the code is always set to 500.
The fix is simple, just change the following:
else:
if type(status) in StringTypes: status = status.lower()
status = status_codes.get(status, 500) self._status = status
to (note indentation)
else:
if type(status) in StringTypes: status = status.lower() status = status_codes.get(status, 500) self._status = status
This is a major problem for me right now, so I'm going to fix it immediately.
I literally *just* ran into this same exact problem. In our case, we want to use non-standard status codes that are outside of the http spec. Although the reason we specify gets used, the code is always set to 500.
The fix is simple, just change the following:
else:
status = status.lower() codes.get( status, 500)
self._ status = status
if type(status) in StringTypes:
status = status_
to (note indentation)
else:
status = status.lower()
status = status_ codes.get( status, 500)
self._ status = status
if type(status) in StringTypes:
This is a major problem for me right now, so I'm going to fix it immediately.