This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: httplib and http.client are missing response messages for defined WEBDAV responses, e.g., UNPROCESSABLE_ENTITY (422)
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.4, Python 2.7
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: rhettinger Nosy List: BreamoreBoy, berker.peksag, craigloftus, demian.brecht, flox, r.david.murray, rhettinger
Priority: normal Keywords: patch

Created on 2012-06-07 11:15 by craigloftus, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue15025_a.diff demian.brecht, 2014-06-17 05:01 review
issue15025_b.diff demian.brecht, 2014-06-17 05:01 review
Messages (4)
msg162470 - (view) Author: Craig Loftus (craigloftus) Date: 2012-06-07 11:15
Calling httplib.responses[httplib.UNPROCESSABLE_ENTITY] in 2.7, or http.client.responses[http.client.UNPROCESSABLE_ENTITY] raises "KeyError: 422".

The expected behaviour would be to return "Unprocessable Entity".

This is the specific issue that I have hit, but the same is true of all the WEBDAV status codes that constants are defined for.
msg220641 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-06-15 14:32
Can someone take a look please as nobody is given against http in the experts index.
msg220790 - (view) Author: Demian Brecht (demian.brecht) * (Python triager) Date: 2014-06-17 05:01
Indeed the WEBDAV codes were missing across the board. I've added a couple patches: One (_a) that just adds the missing constants, and another (_b) that changes how they're defined altogether. The advantage of the second is that there is much less chance of running into this desync going forward. Having said that, I have no false hope that anyone will think it's a sane or obvious way of going about defining them ;)
msg233235 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2014-12-31 09:34
This was fixed by issue 21793.
History
Date User Action Args
2022-04-11 14:57:31adminsetgithub: 59230
2014-12-31 09:34:10berker.peksagsetstatus: open -> closed

nosy: + berker.peksag
messages: + msg233235

resolution: out of date
stage: resolved
2014-07-05 17:34:21floxsetnosy: + flox
2014-06-21 03:04:15rhettingersetassignee: rhettinger

nosy: + rhettinger
2014-06-17 18:11:43r.david.murraysetnosy: + r.david.murray
2014-06-17 05:01:59demian.brechtsetfiles: + issue15025_b.diff
2014-06-17 05:01:47demian.brechtsetfiles: + issue15025_a.diff
keywords: + patch
messages: + msg220790
2014-06-17 02:19:56demian.brechtsetnosy: + demian.brecht
2014-06-15 14:32:05BreamoreBoysetnosy: + BreamoreBoy
messages: + msg220641
2012-06-07 11:15:42craigloftuscreate