[Python-bugs-list] [Bug #123045] httplib uses a case-sensitive comparision on HTTP-Version

noreply@sourceforge.net noreply@sourceforge.net
Tue, 21 Nov 2000 22:20:11 -0800


Bug #123045, was updated on 2000-Nov-20 22:41
Here is a current snapshot of the bug.

Project: Python
Category: Modules
Status: Closed
Resolution: Invalid
Bug Group: None
Priority: 5
Summary: httplib uses a case-sensitive comparision on HTTP-Version

Details: I am working with an HTTP server that uses a lower-cased "HTTP" in the status line.  The server authors have refered me to RFC 2616 2.1, 3.1, 6.1, which imply that a conforming implementation can return a lower-cased "http" in the status line.  (6.1 defines that a "Status-Line" begins with an "HTTP-Version".  3.1 defines "HTTP-Version" as begining with "HTTP".  2.1 explains that string literals in ABNF are case-insensitive, unless otherwise stated.)

httlib.HTTPResponse.begin determines that the status line is bad if the following code tests true:

    if version[:5] != 'HTTP/'

using a case-sensitive comparison routine.  Subsequent code also uses case insensitive comparison routine.

A similar bug was submitted as #119556, but the resolution did not take case differences into account.


Follow-Ups:

Date: 2000-Nov-21 22:20
By: gstein

Comment:
I exchanged an email with Roy Fielding, author of RFC 2616 and explained the situation. He stated the /intent/ was to be case-sensitive. Further, that if the RFC implies/states otherwise, then it was a mistake (and one which probably happened during some last minute edits).

Roy was rather emphatic that the HTTP should be in upper case and that any client or server using anything different is broken (read: non-conforming).

Based on Roy's expert feedback, I'm closing this bug as "Invalid" / "Won't fix".

-------------------------------------------------------

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=123045&group_id=5470