[issue15799] httplib client and statusline

2014-09-26 Thread Senthil Kumaran
Senthil Kumaran added the comment: Sorry that I did not get involved earlier. It is difficult to prove any problem with the current behavior and it is rightly closed. The issue which was originally raised seems to me a cosmetic one, which won't get exhibited as well. Here is simple test

[issue15799] httplib client and statusline

2014-09-25 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- stage: - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15799 ___ ___

[issue15799] httplib client and statusline

2014-09-24 Thread karl
karl added the comment: Let's close this. HTTP/1.1301 .split(None, 2) ['HTTP/1.1', '301'] HTTP/1.1301 .split(' ', 2) ['HTTP/1.1', '', ' 301 '] I think it would be nice to have a way to warn without stopping, but the last comment from r.david.murray makes sense too. :) --

[issue15799] httplib client and statusline

2012-08-30 Thread karl
karl added the comment: So what do we do with it? Do I created a patch or do we close that bug? :) No hard feelings about it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15799 ___

[issue15799] httplib client and statusline

2012-08-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, I'd like to hear Senthil's opinion, since he's the main http / urllib maintainer these days. -- versions: +Python 3.3 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15799

[issue15799] httplib client and statusline

2012-08-30 Thread R. David Murray
R. David Murray added the comment: I'm inclined to think it isn't worth the effort, myself. I think a validating client would be a valuable tool, but that that isn't what the stdlib is focused on. But yes, let's hear Senthil's opinion. (That said, I am in fact adding a lot of validation

[issue15799] httplib client and statusline

2012-08-28 Thread karl
New submission from karl: The current parsing of HTTP status line seems strange with regards to its definition in HTTP. http://hg.python.org/cpython/file/3.2/Lib/http/client.py#l307 Currently the code is version, status, reason = line.split(None, 2) status1 = HTTP/1.1 200 OK status2 =

[issue15799] httplib client and statusline

2012-08-28 Thread R. David Murray
R. David Murray added the comment: Could you explain the error you are seeing in more detail first? You are talk about parsing and fixes here, but I'm not clear on what the actual bug is you are reporting. -- nosy: +r.david.murray ___ Python

[issue15799] httplib client and statusline

2012-08-28 Thread karl
karl added the comment: ok. status lines 1 and 2 are valid. the third one is invalid and should trigger a raise BadStatusLine(line) The code at line 318 is bogus as it will parse happily the third line without raising an exception.

[issue15799] httplib client and statusline

2012-08-28 Thread R. David Murray
R. David Murray added the comment: Why should it raise an error? The postel principle suggests that we should treat it as equivalent to the second line. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15799

[issue15799] httplib client and statusline

2012-08-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: I would point out that the goal of the http module is to provide interoperability with real-life servers, rather than be a strict implementation of RFCs. So, starting to raise errors for HTTP/1.1 200 while HTTP/1.1 200 remains ok might not be the best idea.

[issue15799] httplib client and statusline

2012-08-28 Thread karl
karl added the comment: Fair enough, it could be a warning when * more than one space in between http version and status code * if there is a missing space after the status code I'm not advocating for being strict only. I'm advocating for giving the tools to developer to assess that things