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.

classification
Title: http.client example is no longer valid
Type: Stage: resolved
Components: Documentation Versions: Python 3.6, Python 3.2, Python 3.3, Python 3.4, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, python-dev, steven.daprano
Priority: normal Keywords:

Created on 2015-05-03 14:39 by steven.daprano, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg242483 - (view) Author: Steven D'Aprano (steven.daprano) * (Python committer) Date: 2015-05-03 14:39
The example code for http.client shows www.python.org/parrot.spam return a 404:

https://docs.python.org/3/library/http.client.html#examples

>>> # Example of an invalid request
>>> conn.request("GET", "/parrot.spam")
>>> r2 = conn.getresponse()
>>> print(r2.status, r2.reason)
404 Not Found


However it no longer does that, instead it returns a 301 Moved Permanently.
msg242495 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-05-03 17:00
New changeset 71ec881d8347 by Benjamin Peterson in branch '3.4':
update example, since python.org is HTTPS-only now (closes #24118)
https://hg.python.org/cpython/rev/71ec881d8347

New changeset 376c2d81d0e2 by Benjamin Peterson in branch '2.7':
update example, since python.org is HTTPS-only now (closes #24118)
https://hg.python.org/cpython/rev/376c2d81d0e2

New changeset 07571d2968b0 by Benjamin Peterson in branch 'default':
merge 3.4 (#24118)
https://hg.python.org/cpython/rev/07571d2968b0
History
Date User Action Args
2022-04-11 14:58:16adminsetgithub: 68306
2015-05-03 17:00:46python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg242495

resolution: fixed
stage: resolved
2015-05-03 14:39:28steven.dapranocreate