[Python-Dev] Remove HTTP 0.9 support
orsenthil at gmail.com
Thu Dec 16 09:14:04 CET 2010
On Wed, Dec 15, 2010 at 02:20:54PM -0800, Glenn Linderman wrote:
> On 12/15/2010 10:39 AM, Antoine Pitrou wrote:
> I would like to remove HTTP 0.9 support from http.client and
> http.server. I've opened an issue at http://bugs.python.org/issue10711
> for that. Would anyone think it's a bad idea?
> (HTTP 1.0 was devised in 1996)
> Please address the following comment from the server.py source:
> # The default request version. This only affects responses up until
> # the point where the request line is parsed, so it mainly decides what
> # the client gets back when sending a malformed request line.
> # Most web servers default to HTTP 0.9, i.e. don't send a status line.
> default_request_version = "HTTP/0.9"
> What do you mean by "address"? The patch changes this to 1.0.
> And, as the comment says, this only affects what happens when the
> client sends a syntactically invalid request line, so whether the server
> does a 0.9-style or 1.0-style response is unimportant.
> Just what you did... justify the unimportance of not changing it :) Since now
> it is different than "most web servers".
+1 to removing HTTP 0.9 related code in http.client and http.server.
Until today, I hadn't cared to read any details of HTTP 0.9 except
that I knew that some code was present in http library to support it.
Reading a bit about the HTTP 0.9 'Internet Draft' written 1991 is
enough to convince that, if we have to fall back on any old behavior
falling back to HTTP 1.0 is perfectly fine.
Regarding this comment
# Most web servers default to HTTP 0.9, i.e. don't send a status line.
Even HTTP 0.9 says that response SHOULD start with status line, but
gives a suggestion that clients can "tolerate" bad server server
behaviors when they don't send the status line and in that the case
response is the body.
So, It cannot be associated with the behavior "most webservers", back
then and even more so now.
More information about the Python-Dev