[Python-bugs-list] [ python-Bugs-676273 ] BaseHTTPServer; HTTP/1.1 spec not "vague"
SourceForge.net
noreply@sourceforge.net
Wed, 29 Jan 2003 16:24:59 -0800
Bugs item #676273, was opened at 2003-01-28 12:09
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=676273&group_id=5470
Category: Python Library
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Andrew Dalke (dalke)
Assigned to: Nobody/Anonymous (nobody)
>Summary: BaseHTTPServer; HTTP/1.1 spec not "vague"
Initial Comment:
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.
----------------------------------------------------------------------
>Comment By: Andrew Dalke (dalke)
Date: 2003-01-29 17:24
Message:
Logged In: YES
user_id=190903
Silly interface
----------------------------------------------------------------------
Comment By: Andrew Dalke (dalke)
Date: 2003-01-29 17:24
Message:
Logged In: YES
user_id=190903
Silly interface
----------------------------------------------------------------------
Comment By: Neal Norwitz (nnorwitz)
Date: 2003-01-29 14:21
Message:
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. :-( )
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=676273&group_id=5470