Issue 676273: BaseHTTPServer; HTTP/1.1 spec not "vague" (original) (raw)

Created on 2003-01-28 19:09 by dalke, last changed 2022-04-10 16:06 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
BaseHTTPServer.diff2 dalke,2003-01-30 00:24 diff to remove comments about vague spec
BaseHTTPServer.diff2 dalke,2003-01-30 00:24 diff to remove comments about vague spec
Messages (5)
msg14265 - (view) Author: Andrew Dalke (dalke) * (Python committer) Date: 2003-01-28 19:09
The module docstring for BaseHTTPServer says The protocol is vague about whether lines are separated by LF characters or by CRLF pairs -- for compatibility with the widest range of clients, both should be accepted. Similarly, whitespace in the request line should be treated sensibly (allowing multiple spaces between components and allowing trailing whitespace). HTTP/1.1 is not vague. It says in section 2.2 of the spec HTTP/1.1 defines the sequence CR LF as the end-of-line marker for all protocol elements except the entity-body but with the suggestion in 19.3 that Clients SHOULD be tolerant in parsing the Status-Line and servers tolerant when parsing the Request-Line. In particular, they SHOULD accept any amount of SP or HT characters between fields, even though only a single SP is required. The line terminator for message-header fields is the sequence CRLF. However, we recommend that applications, when parsing such headers, recognize a single LF as a line terminator and ignore the leading CR. This means that 1) the spec is not vague and 2) the Python code works according to the spec. So my suggestion is to remove the comment about being "vague" from the spec. A diff is attached.
msg14266 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2003-01-29 21:21
Logged In: YES user_id=33168 There's no uploaded file! You have to check the checkbox labeled "Check to Upload & Attach File" when you upload a file. Please try again. (This is a SourceForge annoyance that we can do nothing about. :-( )
msg14267 - (view) Author: Andrew Dalke (dalke) * (Python committer) Date: 2003-01-30 00:24
Logged In: YES user_id=190903 Silly interface
msg14268 - (view) Author: Andrew Dalke (dalke) * (Python committer) Date: 2003-01-30 00:24
Logged In: YES user_id=190903 Silly interface
msg14269 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2003-02-03 15:27
Logged In: YES user_id=11375 Checked in to CVS as rev. 1.23; thanks!
History
Date User Action Args
2022-04-10 16:06:14 admin set github: 37855
2003-01-28 19:09:12 dalke create