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.
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. :-( )