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: urllib HTTPRedirectHandler does not implement documented behavior
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.2
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: tkel
Priority: normal Keywords:

Created on 2011-12-22 16:14 by tkel, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (1)
msg150102 - (view) Author: Tommy Kelly (tkel) Date: 2011-12-22 16:14
Python 3.2.2, 
Here is a blokck of code from the HTTPRedirectHandler:

        m = req.get_method()
        if (not (code in (301, 302, 303, 307) and m in ("GET", "HEAD")
            or code in (301, 302, 303) and m == "POST")):
            raise HTTPError(req.full_url, code, msg, headers, fp)

        # Strictly (according to RFC 2616), 301 or 302 in response to
        # a POST MUST NOT cause a redirection without confirmation
        # from the user (of urllib.request, in this case).  In practice,
        # essentially all clients do redirect in this case, so we do
        # the same.

As you can see, the documentation and the implementation are contradictory.
History
Date User Action Args
2022-04-11 14:57:24adminsetgithub: 57859
2011-12-22 16:25:19tkelsetstatus: open -> closed
2011-12-22 16:14:50tkelcreate