[issue46285] http/server.py wont respect its protocol_version

2022-01-09 Thread Hugo Almeida
Hugo Almeida added the comment: Hi, buddy, there is no problem if invoke the http.server.test function as its designed, I mean the function iteself is okay, thus http/server.py invoked it via the functools.partial wrapper (handler_class) only will case this issue, which technically ignored i

[issue46285] http/server.py wont respect its protocol_version

2022-01-09 Thread Éric Araujo
Éric Araujo added the comment: I am a bit confused! The script you attached is to show a problem, but you’re saying there is no problem? -- ___ Python tracker ___ ___

[issue46285] http/server.py wont respect its protocol_version

2022-01-08 Thread Hugo Almeida
Hugo Almeida added the comment: The short story is, everything is okay, its my bad to taken the test function out of context, sorry about that of issue report. # just for details review (related file attached): # # check line 1277 to line 1278 (main branch of Python currently): # https://githu

[issue46285] http/server.py wont respect its protocol_version

2022-01-07 Thread Éric Araujo
Éric Araujo added the comment: I understand your report better after looking at the code. There is indeed a protocol_version parameter in the test function (which is really a main function, not test), that sets the protocol attribute on the passed handler class. (The class attribute is chang

[issue46285] http/server.py wont respect its protocol_version

2022-01-07 Thread Éric Araujo
Éric Araujo added the comment: Hello and thanks for the report! Could you tell more about what you’re trying to achieve? Some notes: You are not meant to change the code of provided modules, but to instantiate classes with the right parameters, or subclass in your own code to change how so

[issue46285] http/server.py wont respect its protocol_version

2022-01-06 Thread Hugo Almeida
Hugo Almeida added the comment: update == It seems I've found the problem, http/server.py#L1277-L1288: ``` handler_class = partial(SimpleHTTPRequestHandler, directory=args.directory) ``` Because of `partial` (provide by the functools module), there

[issue46285] http/server.py wont respect its protocol_version

2022-01-06 Thread Hugo Almeida
New submission from Hugo Almeida : Hi, Sorry for my poor English, this is not a spam issue. How to reproduce File about `http/server.py`, line 1235 at main branch. 1st, change `protocol_version`, e.g. from "HTTP/1.0" to "HTTP/1.1": --- protocol="HTTP/1.0", port=8000