Skip to content

bpo-33830: Fix http.client 404 docs#7780

Merged
serhiy-storchaka merged 2 commits into
python:masterfrom
tirkarthi:bpo33830-httplib-docs-fix
Dec 21, 2018
Merged

bpo-33830: Fix http.client 404 docs#7780
serhiy-storchaka merged 2 commits into
python:masterfrom
tirkarthi:bpo33830-httplib-docs-fix

Conversation

@tirkarthi
Copy link
Copy Markdown
Member

@tirkarthi tirkarthi commented Jun 18, 2018

Fix invalid request in docs to return 404 NOT FOUND which currently returns 404 OK. I think using an example with 404 OK is misleading and couldn't find an endpoint that returns 404 NOT FOUND in python.org . pythontest.net used for test suite doesn't have https in it.

This needs to fixed in 2.7 where '/' instead of '/parrot.spam' which is also incorrect.

Please add skip-news label for this

Thanks

https://bugs.python.org/issue33830

Comment thread Doc/library/http.client.rst Outdated
...
>>> # Example of an invalid request
>>> conn.request("GET", "/parrot.spam")
>>> conn = http.client.HTTPSConnection("httpbin.org")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would suggest hitting a python host that is going to be up for the forseeable future. docs.python.org for example returns the "correct" message of 404 Not Found.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks, I have changed the the host to docs.python.org and tested the same.

@miss-islington
Copy link
Copy Markdown
Contributor

Thanks @tirkarthi for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖

@bedevere-bot
Copy link
Copy Markdown

GH-11278 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 21, 2018
(cherry picked from commit f0af4c5)

Co-authored-by: Xtreak <tirkarthi@users.noreply.github.com>
miss-islington added a commit that referenced this pull request Dec 21, 2018
(cherry picked from commit f0af4c5)

Co-authored-by: Xtreak <tirkarthi@users.noreply.github.com>
@tirkarthi
Copy link
Copy Markdown
Member Author

Thanks @serhiy-storchaka :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants