This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author openalmeida
Recipients openalmeida
Date 2022-01-06.18:39:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1641494361.52.0.586828537376.issue46285@roundup.psfhosted.org>
In-reply-to
Content
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, ...
+++          protocol="HTTP/1.1", port=8000, ...

2ed, run with `python -m http.server` and test by: `curl http://127.0.0.1:8000 2>/dev/null| head -n 1`

Result
======

The response head line will always been a fixed HTTP Version refer to `BaseHTTPRequestHandler.protocol_version` defined, thus "HTTP/1.0 200 OK" currently.

Expected
========

It should equal to `http.server.test(protocol="...")` which specified like above, for this issue, it is expected to be "HTTP/1.1 200 OK".

P.S.
====

I know it is just locate in a test code area (http.servers::test), but what I submit here is about a Python Variable Scope issue maybe.
History
Date User Action Args
2022-01-06 18:39:21openalmeidasetrecipients: + openalmeida
2022-01-06 18:39:21openalmeidasetmessageid: <1641494361.52.0.586828537376.issue46285@roundup.psfhosted.org>
2022-01-06 18:39:21openalmeidalinkissue46285 messages
2022-01-06 18:39:21openalmeidacreate