[Patches] [ python-Patches-1025790 ] Add status code constants to
httplib
SourceForge.net
noreply at sourceforge.net
Mon Sep 13 03:51:10 CEST 2004
Patches item #1025790, was opened at 2004-09-10 21:48
Message generated for change (Comment added) made by adurdin
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1025790&group_id=5470
Category: Library (Lib)
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Andrew Eland (andreweland)
Assigned to: Nobody/Anonymous (nobody)
Summary: Add status code constants to httplib
Initial Comment:
httplib doesn't define constants for the HTTP integer
status codes, so most applications end up defining
their own subset. This patch adds status code constants
to httplib, using the same names as Twisted, and
updates the documentation.
----------------------------------------------------------------------
Comment By: Andrew Durdin (adurdin)
Date: 2004-09-13 11:51
Message:
Logged In: YES
user_id=625864
I think the best standard way of spelling the constants is
to take them directly from the 10.x.x headings of RFC2616.
This would require changing four of the names of the
constants in the patch from:
SWITCHING = 101
MULTIPLE_CHOICE = 300
NOT_ALLOWED = 405
PROXY_AUTH_REQUIRED = 407
to:
SWITCHING_PROTOCOLS = 101
MULTIPLE_CHOICES = 300
METHOD_NOT_ALLOWED = 405
PROXY_AUTHENTICATION_REQUIRED = 407
Also, the following status codes are not part of the
HTTP/1.1 standard as given in RFC2616:
MULTI_STATUS = 207
INSUFFICIENT_STORAGE_SPACE = 507
NOT_EXTENDED = 510
Where do these come from? Being nonstandard, is it
inappropriate to include them in httplib?
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2004-09-11 06:54
Message:
Logged In: YES
user_id=21627
Unless the precise spelling of the constants is taken from
some existing specification, I think the documentation needs
to spell out the values, so that readers can easily confirm
that a certain symbolic value has the meaning they expect.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1025790&group_id=5470
More information about the Patches
mailing list