[Web-SIG] Re: [Python-Dev] Adding status code constants to httplib (original) (raw)
Alan Kennedy py-web-sig at xhaus.com
Fri Sep 10 17:45:35 CEST 2004
- Previous message: [Python-Dev] Adding status code constants to httplib
- Next message: [Web-SIG] Re: [Python-Dev] Adding status code constants to httplib
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[Phillip J. Eby]
I would also put the statuses in a dictionary, such that:
statuscode[BADGATEWAY] = "Bad Gateway"
[Andrew Eland]
There's a table mapping status codes to messages on BaseHTTPRequestHandler at the moment. It could be moved into httplib to make it more publically visible.
And that mapping has 2 levels of human readable messages on it, for example
304: ('Not modified', 'Document has not changed singe given time'),
I think that, since the human readable versions are seldom heeded anyway, perhaps a single message is all we need?
And I'm -1 on forcing servers, particularly CGI servers, to import the client-side httplib (2.3 httplib.pyc == 42K) just to get this mapping.
If the changes are not going to make it in until the next release of cpython anyway, then maybe we should just aim for a new module? Or is some version of 2.4 the target, in which case minimal patches might make it in, whereas new modules won't?
Just my 0,02 euro.
Alan.
- Previous message: [Python-Dev] Adding status code constants to httplib
- Next message: [Web-SIG] Re: [Python-Dev] Adding status code constants to httplib
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]