msg124032 - (view) |
Author: Antoine Pitrou (pitrou) * |
Date: 2010-12-15 17:04 |
Both http.client and http.server claim to support HTTP 0.9. The HTTP 1.0 RFC was filed in 1996, and 1.1 is most commonly used nowadays. We should probably rip off 0.9 support.
|
msg124034 - (view) |
Author: Antoine Pitrou (pitrou) * |
Date: 2010-12-15 17:54 |
Here is a patch.
|
msg124040 - (view) |
Author: Daniel Stutzbach (stutzbach) |
Date: 2010-12-15 18:47 |
Would it be worth keeping (but modifying) test_http_0_9 to verify that the server complains in the expected way?
|
msg124043 - (view) |
Author: Gregory P. Smith (gregory.p.smith) * |
Date: 2010-12-15 18:52 |
Ripping HTTP "0.9" support _out_ flys directly in the face of "be lenient in what you accept and strict in what you produce."
I do not mind removing support from http.server. But http.client needs to be able to communicate with any random server created since the dawn of time. Often on 8 bit microcontrollers that haven't been updated since 1994.
How does keeping 0.9 client support in hurt us?
|
msg124044 - (view) |
Author: Daniel Stutzbach (stutzbach) |
Date: 2010-12-15 18:59 |
At minimum, I think we should apply this part of Antoine's patch:
- # Most web servers default to HTTP 0.9, i.e. don't send a status line.
- default_request_version = "HTTP/0.9"
+ default_request_version = "HTTP/1.0"
|
msg124045 - (view) |
Author: Antoine Pitrou (pitrou) * |
Date: 2010-12-15 19:00 |
> But http.client needs to be able to communicate with any random server
> created since the dawn of time.
Well, that sounds a bit unreasonable...
> Often on 8 bit microcontrollers that haven't been updated since 1994.
Anyone with such needs should write specialized software, shouldn't they?
> How does keeping 0.9 client support in hurt us?
In any such situation, there's typically a long-term cost in additional maintenance when patching and improving the code.
More specifically, this issue came when discussing #6791. Protecting http.client against unbounded reads will be hairy if we have to support HTTP 0.9-style "simple responses".
|
msg124046 - (view) |
Author: Antoine Pitrou (pitrou) * |
Date: 2010-12-15 19:01 |
> Would it be worth keeping (but modifying) test_http_0_9 to verify that
> the server complains in the expected way?
Actually, I don't think the server will complain, since the request is legit. It will send back a full response with status line and headers, though, so the test has to be adapted indeed.
|
msg124049 - (view) |
Author: Antoine Pitrou (pitrou) * |
Date: 2010-12-15 19:15 |
Patch with adapted tests.
|
msg124070 - (view) |
Author: Gregory P. Smith (gregory.p.smith) * |
Date: 2010-12-15 21:07 |
Given the 6961 issue I'm happy to change my position and say we nuke the 0.9 client support.
Anyone who _needs_ that can grab this old code or write trivial code for their poor server's needs.
|
msg124113 - (view) |
Author: Senthil Kumaran (orsenthil) * |
Date: 2010-12-16 08:21 |
+1 removing HTTP 0.9, and falling back to HTTP 1.0 behavior where ever it was HTTP 0.9. Removing support for response without status (which was acceptable by 0.9) is fine. I reviewed the patch too and it seems good to go.
|
msg124146 - (view) |
Author: Antoine Pitrou (pitrou) * |
Date: 2010-12-16 18:22 |
I'm opening a separate issue (issue10721) for the server side and retargetting this issue to client support. Patch attached.
|
msg124150 - (view) |
Author: Éric Araujo (eric.araujo) * |
Date: 2010-12-16 18:57 |
Patch LGTM, modulo warnings.warn calls lacking a stacklevel=2 parameter.
|
msg124234 - (view) |
Author: Antoine Pitrou (pitrou) * |
Date: 2010-12-17 17:37 |
Patch committed in r87340.
|
|
Date |
User |
Action |
Args |
2022-04-11 14:57:10 | admin | set | github: 54920 |
2010-12-17 17:37:24 | pitrou | set | status: open -> closed nosy:
jhylton, gregory.p.smith, exarkun, orsenthil, pitrou, giampaolo.rodola, stutzbach, eric.araujo messages:
+ msg124234
resolution: fixed stage: patch review -> resolved |
2010-12-16 18:57:52 | eric.araujo | set | nosy:
+ eric.araujo messages:
+ msg124150
|
2010-12-16 18:22:03 | pitrou | set | files:
+ removehttp09-3.patch
title: Rip out HTTP 0.9 support -> Rip out HTTP 0.9 client support messages:
+ msg124146 nosy:
jhylton, gregory.p.smith, exarkun, orsenthil, pitrou, giampaolo.rodola, stutzbach |
2010-12-16 08:21:43 | orsenthil | set | nosy:
jhylton, gregory.p.smith, exarkun, orsenthil, pitrou, giampaolo.rodola, stutzbach messages:
+ msg124113 |
2010-12-15 21:07:51 | gregory.p.smith | set | nosy:
jhylton, gregory.p.smith, exarkun, orsenthil, pitrou, giampaolo.rodola, stutzbach messages:
+ msg124070 |
2010-12-15 19:15:11 | pitrou | set | files:
+ removehttp09-2.patch nosy:
jhylton, gregory.p.smith, exarkun, orsenthil, pitrou, giampaolo.rodola, stutzbach messages:
+ msg124049
|
2010-12-15 19:04:07 | giampaolo.rodola | set | nosy:
+ giampaolo.rodola
|
2010-12-15 19:01:00 | pitrou | set | nosy:
jhylton, gregory.p.smith, exarkun, orsenthil, pitrou, stutzbach messages:
+ msg124046 |
2010-12-15 19:00:04 | pitrou | set | nosy:
jhylton, gregory.p.smith, exarkun, orsenthil, pitrou, stutzbach messages:
+ msg124045 |
2010-12-15 18:59:43 | stutzbach | set | nosy:
jhylton, gregory.p.smith, exarkun, orsenthil, pitrou, stutzbach messages:
+ msg124044 |
2010-12-15 18:52:47 | gregory.p.smith | set | nosy:
+ gregory.p.smith messages:
+ msg124043
|
2010-12-15 18:47:48 | stutzbach | set | nosy:
+ stutzbach messages:
+ msg124040
|
2010-12-15 18:04:18 | pitrou | set | files:
+ removehttp09.patch |
2010-12-15 18:03:14 | pitrou | set | files:
- removehttp09.patch |
2010-12-15 18:01:26 | pitrou | set | nosy:
+ exarkun
|
2010-12-15 17:54:24 | pitrou | set | files:
+ removehttp09.patch
messages:
+ msg124034 keywords:
+ patch stage: needs patch -> patch review |
2010-12-15 17:14:56 | pitrou | set | title: Rip off HTTP 0.9 support -> Rip out HTTP 0.9 support |
2010-12-15 17:04:57 | pitrou | create | |