Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
[3.14] gh-134168: fixhttp.server
CLI support for IPv6 and--directory
when serving over HTTPS (#134169)#134630
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
picnixz commentedMay 24, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@ggqlq Can you check that this works on3.14 (not 3.15). It should work but we never know. TiA. For this one, can you check both IPv4 and IPv6? |
…-directory` when serving over HTTPS (pythonGH-134169)(cherry picked from commit2fd09b0)Co-authored-by: ggqlq <124190229+ggqlq@users.noreply.github.com>
(I forced push because I wanted the cherry-picker message (I managed to make it work)) |
ggqlq commentedMay 24, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
All passed! IPv4 + SSL$ ./python -m http.server -b 127.0.0.1 --tls-cert~/ssl/localhost.crt --tls-key~/ssl/localhost.keyServing HTTPS on 127.0.0.1 port 8000 (https://127.0.0.1:8000/) ...$ curl -k https://127.0.0.1:8000# ...<ul><li><a href=".azure-pipelines/">.azure-pipelines/</a></li><li><a href=".coveragerc">.coveragerc</a></li> IPv4 + other directory$ ./python -m http.server -b 127.0.0.1 -d~/testServing HTTP on 127.0.0.1 port 8000 (http://127.0.0.1:8000/) ...$ curl http://127.0.0.1:8000# ...<ul><li><a href="1">1</a></li><li><a href="2">2</a></li><li><a href="3">3</a></li> IPv4 + other directory + SSL$ ./python -m http.server -b 127.0.0.1 --tls-cert~/ssl/localhost.crt --tls-key~/ssl/localhost.key -d~/testServing HTTPS on 127.0.0.1 port 8000 (https://127.0.0.1:8000/) ...$ curl -k https://127.0.0.1:8000# ...<ul><li><a href="1">1</a></li><li><a href="2">2</a></li><li><a href="3">3</a></li></ul> IPv6 + SSL$ ./python -m http.server -b ::1 --tls-cert~/ssl/localhost.crt --tls-key~/ssl/localhost.keyServing HTTPS on ::1 port 8000 (https://[::1]:8000/) ...$ curl -k https://[::1]:8000# ...<ul><li><a href=".azure-pipelines/">.azure-pipelines/</a></li><li><a href=".coveragerc">.coveragerc</a></li> IPv6 + other directory$ ./python -m http.server -b ::1 -d~/testServing HTTP on ::1 port 8000 (http://[::1]:8000/) ...$ curl http://[::1]:8000# ...<ul><li><a href="1">1</a></li><li><a href="2">2</a></li><li><a href="3">3</a></li></ul> IPv6 + other directory + SSL$ ./python -m http.server -b ::1 --tls-cert~/ssl/localhost.crt --tls-key~/ssl/localhost.key -d~/testServing HTTPS on ::1 port 8000 (https://[::1]:8000/) ...$ curl -k https://[::1]:8000# ...<ul><li><a href="1">1</a></li><li><a href="2">2</a></li><li><a href="3">3</a></li></ul> |
81f0993
intopython:3.14Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
(cherry picked from commit2fd09b0)
Co-authored-by: ggqlq124190229+ggqlq@users.noreply.github.com