Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-46285: Add command-line option -p/--protocol to module http.server #30999

Merged
merged 5 commits into from
May 2, 2022

Conversation

geryogam
Copy link
Contributor

@geryogam geryogam commented Jan 28, 2022

This PR will add command-line option -p/--protocol to module http.server which specifies the HTTP version to which the server is conformant (HTTP/1.1 servers can now be run from the command-line interface of module http.server):

python -m http.server --protocol HTTP/1.1

https://bugs.python.org/issue46285

@merwok
Copy link
Member

merwok commented Jan 29, 2022

Thanks for the the PR! Let’s merge this one after the bug fix to the same module.

@geryogam geryogam force-pushed the patch-26 branch 3 times, most recently from 5323621 to f5e0dc4 Compare January 30, 2022 23:38
@merwok merwok self-assigned this Jan 31, 2022
Doc/library/http.server.rst Outdated Show resolved Hide resolved
@merwok
Copy link
Member

merwok commented Feb 4, 2022

Please avoid rebases and force-pushes for CPython, github does not have a good experience for reviewers.
Regular merges are also easier to do!

@merwok merwok requested a review from orsenthil May 1, 2022 12:24
Copy link
Member

@orsenthil orsenthil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

I had a brief hesitancy for exposing this protocol version via flag as the support is not comprehensive. I am pretty sure we are missing many features.

But given that class supports .protocol_version as a attribute, exposing it via a command line flag is alright.

@JelleZijlstra JelleZijlstra self-assigned this May 2, 2022
@JelleZijlstra JelleZijlstra merged commit 2d30ade into python:main May 2, 2022
@geryogam
Copy link
Contributor Author

geryogam commented May 3, 2022

Thanks @merwok, @JelleZijlstra, and @orsenthil for the review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants