Comment 1 for bug 322486

Revision history for this message
Paul Carduner (pcardune) wrote :

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.