homepage

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: Rip out HTTP 0.9 client support
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.2
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: eric.araujo, exarkun, giampaolo.rodola, gregory.p.smith, jhylton, orsenthil, pitrou, stutzbach
Priority: normal Keywords: patch

Created on 2010年12月15日 17:04 by pitrou, last changed 2022年04月11日 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
removehttp09.patch pitrou, 2010年12月15日 18:04
removehttp09-2.patch pitrou, 2010年12月15日 19:15
removehttp09-3.patch pitrou, 2010年12月16日 18:22
Messages (13)
msg124032 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) 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) * (Python committer) Date: 2010年12月15日 17:54
Here is a patch.
msg124040 - (view) Author: Daniel Stutzbach (stutzbach) (Python committer) 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) * (Python committer) 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) (Python committer) 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) * (Python committer) 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) * (Python committer) 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) * (Python committer) Date: 2010年12月15日 19:15
Patch with adapted tests.
msg124070 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) 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) * (Python committer) 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) * (Python committer) 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) * (Python committer) Date: 2010年12月16日 18:57
Patch LGTM, modulo warnings.warn calls lacking a stacklevel=2 parameter.
msg124234 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2010年12月17日 17:37
Patch committed in r87340.
History
Date User Action Args
2022年04月11日 14:57:10adminsetgithub: 54920
2010年12月17日 17:37:24pitrousetstatus: 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:52eric.araujosetnosy: + eric.araujo
messages: + msg124150
2010年12月16日 18:22:03pitrousetfiles: + 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:43orsenthilsetnosy: jhylton, gregory.p.smith, exarkun, orsenthil, pitrou, giampaolo.rodola, stutzbach
messages: + msg124113
2010年12月15日 21:07:51gregory.p.smithsetnosy: jhylton, gregory.p.smith, exarkun, orsenthil, pitrou, giampaolo.rodola, stutzbach
messages: + msg124070
2010年12月15日 19:15:11pitrousetfiles: + removehttp09-2.patch
nosy: jhylton, gregory.p.smith, exarkun, orsenthil, pitrou, giampaolo.rodola, stutzbach
messages: + msg124049
2010年12月15日 19:04:07giampaolo.rodolasetnosy: + giampaolo.rodola
2010年12月15日 19:01:00pitrousetnosy: jhylton, gregory.p.smith, exarkun, orsenthil, pitrou, stutzbach
messages: + msg124046
2010年12月15日 19:00:04pitrousetnosy: jhylton, gregory.p.smith, exarkun, orsenthil, pitrou, stutzbach
messages: + msg124045
2010年12月15日 18:59:43stutzbachsetnosy: jhylton, gregory.p.smith, exarkun, orsenthil, pitrou, stutzbach
messages: + msg124044
2010年12月15日 18:52:47gregory.p.smithsetnosy: + gregory.p.smith
messages: + msg124043
2010年12月15日 18:47:48stutzbachsetnosy: + stutzbach
messages: + msg124040
2010年12月15日 18:04:18pitrousetfiles: + removehttp09.patch
2010年12月15日 18:03:14pitrousetfiles: - removehttp09.patch
2010年12月15日 18:01:26pitrousetnosy: + exarkun
2010年12月15日 17:54:24pitrousetfiles: + removehttp09.patch

messages: + msg124034
keywords: + patch
stage: needs patch -> patch review
2010年12月15日 17:14:56pitrousettitle: Rip off HTTP 0.9 support -> Rip out HTTP 0.9 support
2010年12月15日 17:04:57pitroucreate

AltStyle によって変換されたページ (->オリジナル) /