[Python-checkins] Add note that headers added via urllib.request.add_header are added to redirected requests (GH-30708) (#92005)

orsenthil webhook-mailer at python.org
Wed Apr 27 18:28:21 EDT 2022


https://github.com/python/cpython/commit/0e16105af69ec33e1215e0543f26a33bc8d10a16
commit: 0e16105af69ec33e1215e0543f26a33bc8d10a16
branch: 3.9
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: orsenthil <senthilx at amazon.com>
date: 2022-04-27T16:28:10-06:00
summary:

Add note that headers added via urllib.request.add_header are added to redirected requests (GH-30708) (#92005)

(cherry picked from commit f348154c8f8a9c254503306c59d6779d4d09b3a9)

Co-authored-by: Ashwin Ramaswami <aramaswamis at gmail.com>

Co-authored-by: Ashwin Ramaswami <aramaswamis at gmail.com>

files:
M Doc/library/urllib.request.rst

diff --git a/Doc/library/urllib.request.rst b/Doc/library/urllib.request.rst
index 1307143a04f1d..6f6523d8afe9f 100644
--- a/Doc/library/urllib.request.rst
+++ b/Doc/library/urllib.request.rst
@@ -542,7 +542,8 @@ request.
    name, and later calls will overwrite previous calls in case the *key* collides.
    Currently, this is no loss of HTTP functionality, since all headers which have
    meaning when used more than once have a (header-specific) way of gaining the
-   same functionality using only one header.
+   same functionality using only one header.  Note that headers added using
+   this method are also added to redirected requests.
 
 
 .. method:: Request.add_unredirected_header(key, header)



More information about the Python-checkins mailing list