[issue27414] http.server.BaseHTTPRequestHandler inconsistence with Content-Length value

2016-11-22 Thread STINNER Victor
STINNER Victor added the comment: Ah, on IRC Xiang told me that send_header("Connection", 1) raises an error. Right, *this* specific case raises an error. But I don't think that it's worth to require text for HTTP header values. If you consider that it's a shame, Python should handle this

[issue27414] http.server.BaseHTTPRequestHandler inconsistence with Content-Length value

2016-11-22 Thread STINNER Victor
STINNER Victor added the comment: Mathieu: "For consistency, all header values should be str." Xiang: issue27414_v2.patch: Doc/library/http.server.rst "*keyword* and *value* should both be :class:`str`." I'm sorry, but I don't understand the whole point of this issue. The current code works,

[issue27414] http.server.BaseHTTPRequestHandler inconsistence with Content-Length value

2016-11-22 Thread Xiang Zhang
Xiang Zhang added the comment: v2 applies the suggestions. -- priority: low -> normal versions: +Python 3.7 Added file: http://bugs.python.org/file45597/issue27414_v2.patch ___ Python tracker

[issue27414] http.server.BaseHTTPRequestHandler inconsistence with Content-Length value

2016-11-21 Thread STINNER Victor
STINNER Victor added the comment: issue27414.patch is not good: see my review. -- nosy: +haypo ___ Python tracker ___

[issue27414] http.server.BaseHTTPRequestHandler inconsistence with Content-Length value

2016-08-27 Thread Xiang Zhang
Xiang Zhang added the comment: Delete by other test cases without restoring? Which is rather impossible to happen. But I'd like it to stay like now. It is not complex and straight when reading. I don't want to change it to swap_attr. -- ___ Python

[issue27414] http.server.BaseHTTPRequestHandler inconsistence with Content-Length value

2016-08-25 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: -pitrou ___ Python tracker ___ ___ Python-bugs-list

[issue27414] http.server.BaseHTTPRequestHandler inconsistence with Content-Length value

2016-08-24 Thread Berker Peksag
Berker Peksag added the comment: In which case would the send_header method be absent? -- ___ Python tracker ___

[issue27414] http.server.BaseHTTPRequestHandler inconsistence with Content-Length value

2016-08-24 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks for the reply berker. It's nice to know this helper. :) But I'd like to keep it as now since I don't see any real advantage to use it and swap_attr will set the attribute even when it's absent, this is not wanted. --

[issue27414] http.server.BaseHTTPRequestHandler inconsistence with Content-Length value

2016-08-24 Thread Berker Peksag
Berker Peksag added the comment: It would be better to use support.swap_attr(). -- nosy: +berker.peksag priority: normal -> low stage: needs patch -> patch review versions: +Python 3.6 -Python 3.5 ___ Python tracker

[issue27414] http.server.BaseHTTPRequestHandler inconsistence with Content-Length value

2016-08-24 Thread Xiang Zhang
Xiang Zhang added the comment: Ping. :) -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue27414] http.server.BaseHTTPRequestHandler inconsistence with Content-Length value

2016-08-14 Thread Xiang Zhang
Xiang Zhang added the comment: I write a patch for this trivial fix along with a corresponding test. Hope it helps. :) -- keywords: +patch Added file: http://bugs.python.org/file44112/issue27414.patch ___ Python tracker

[issue27414] http.server.BaseHTTPRequestHandler inconsistence with Content-Length value

2016-08-14 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +xiang.zhang ___ Python tracker ___ ___ Python-bugs-list

[issue27414] http.server.BaseHTTPRequestHandler inconsistence with Content-Length value

2016-08-09 Thread Martin Panter
Changes by Martin Panter : -- stage: -> needs patch ___ Python tracker ___ ___

[issue27414] http.server.BaseHTTPRequestHandler inconsistence with Content-Length value

2016-06-29 Thread R. David Murray
R. David Murray added the comment: Sorry once again for the infelicitous phrasing. I meant to say "sorry, what I was unclearly asking for was what you were calling that..." Too bad I don't drink coffee or I could blame it on not having had any yet today... --

[issue27414] http.server.BaseHTTPRequestHandler inconsistence with Content-Length value

2016-06-29 Thread R. David Murray
R. David Murray added the comment: For reference, the changeset that introduced that was ee34cb049a10. An interesting feature of that changset is the trace command in the test...I guess the wrong patch was comitted and no one noticed. The trace was obvious fixed but no one appears to have

[issue27414] http.server.BaseHTTPRequestHandler inconsistence with Content-Length value

2016-06-29 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +ezio.melotti, pitrou, rhettinger ___ Python tracker ___

[issue27414] http.server.BaseHTTPRequestHandler inconsistence with Content-Length value

2016-06-29 Thread Mathieu Xhonneux
Mathieu Xhonneux added the comment: It's line 469 in the latest Lib/http/server.py (and not 473). -- ___ Python tracker ___

[issue27414] http.server.BaseHTTPRequestHandler inconsistence with Content-Length value

2016-06-29 Thread Mathieu Xhonneux
New submission from Mathieu Xhonneux: With Python 3.5, when I subclass SimpleHTTPRequestHandler, which itself subclasses BaseHTTPRequestHandler, and I try to access a non-existing file, the server responds with a 404 code, but send_error (see Lib/http/server.py, line 473) adds the