[issue17319] http.server.BaseHTTPRequestHandler send_response_only doesn't check the type and value of the code.

2015-09-19 Thread Martin Panter
Martin Panter added the comment: The proposed patch changes the code to 500 if the code is invalid (rather than raising an exception as I initially assumed). I would be inclined to leave send_response() without any extra error checking or handling, unless this is a common problem and there is

[issue17319] http.server.BaseHTTPRequestHandler send_response_only doesn't check the type and value of the code.

2015-09-19 Thread Martin Panter
Changes by Martin Panter : -- Removed message: http://bugs.python.org/msg227647 ___ Python tracker ___

[issue17319] http.server.BaseHTTPRequestHandler send_response_only doesn't check the type and value of the code.

2015-09-19 Thread Martin Panter
Changes by Martin Panter : -- Removed message: http://bugs.python.org/msg227645 ___ Python tracker ___

[issue17319] http.server.BaseHTTPRequestHandler send_response_only doesn't check the type and value of the code.

2014-09-26 Thread Yury Selivanov
Yury Selivanov added the comment: I left some comments in the codereview. I think that having some half-baked solution is great, but I really would like to see a proper fix, i.e. with remove_header and other methods fixed. Ideally, you should add a UserDict implementation for headers that

[issue17319] http.server.BaseHTTPRequestHandler send_response_only doesn't check the type and value of the code.

2014-09-26 Thread Yury Selivanov
Yury Selivanov added the comment: Oups, my previous comment is related to issue #5550, wrong window. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17319 ___

[issue17319] http.server.BaseHTTPRequestHandler send_response_only doesn't check the type and value of the code.

2014-09-24 Thread karl
karl added the comment: Where this is defined in the new RFC. http://tools.ietf.org/html/rfc7230#section-3.1.2 status-line = HTTP-version SP status-code SP reason-phrase CRLF Things to enforce status-code= 3DIGIT Response status code are now defined in

[issue17319] http.server.BaseHTTPRequestHandler send_response_only doesn't check the type and value of the code.

2013-05-01 Thread Dmi Baranov
Dmi Baranov added the comment: Attached patch for checking status code based at RFC 2616 [1]. Covered by tests. [1] http://tools.ietf.org/html/rfc2616#section-6.1.1 -- keywords: +patch nosy: +dmi.baranov Added file: http://bugs.python.org/file30100/issue17319.patch

[issue17319] http.server.BaseHTTPRequestHandler send_response_only doesn't check the type and value of the code.

2013-05-01 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berker.peksag stage: - patch review versions: +Python 3.4 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17319 ___

[issue17319] http.server.BaseHTTPRequestHandler send_response_only doesn't check the type and value of the code.

2013-02-27 Thread karl
New submission from karl: def send_response_only(self, code, message=None): http://hg.python.org/cpython/file/3.3/Lib/http/server.py#l448 There is no type checking on code or if the code is appropriate. Let's take == #!/usr/bin/env python3.3 import