[Web-SIG] Comments/stylistic ideas regarding WSGI
jim-web-sig at jimdabell.com
Mon Aug 23 07:45:36 CEST 2004
On Monday 23 August 2004 06:27, Ian Bicking wrote:
> Jim Dabell wrote:
> > My only other comment for the time being is that if the status argument
> > to the start_response function was changed to an integer instead of a
> > string, it would be marginally easier to compare and branch on. A custom
> > "reason phrase" that comes after the integer in the response status line
> > can be provided by other means, perhaps gateway.reason_phrase, if
> > desired.
> I've been thinking: is there anything, anywhere, that pays any attention
> to the reason string?
If there is, then it's broken. According to RFC 2616, the reason string is
intended for humans, giving localisation as an example of when it may vary.
"The Reason-Phrase is intended to give a short textual description of the
Status-Code. The Status-Code is intended for use by automata and the
Reason-Phrase is intended for the human user. The client is not required to
examine or display the Reason-Phrase."
"The individual values of the numeric status codes defined for HTTP/1.1, and
an example set of corresponding Reason-Phrase's, are presented below. The
reason phrases listed here are only recommendations -- they MAY be replaced
by local equivalents without affecting the protocol."
I don't think I've come across anything that pays attention to the reason
phrase, but it's a useful reminder to developers when they are debugging
something I suppose.
More information about the Web-SIG