Skip to content

[pull] main from python:main#1252

Merged
pull[bot] merged 2 commits into
tj-python:mainfrom
python:main
Jul 9, 2026
Merged

[pull] main from python:main#1252
pull[bot] merged 2 commits into
tj-python:mainfrom
python:main

Conversation

@pull

@pull pull Bot commented Jul 9, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

Das-Chinmay and others added 2 commits July 8, 2026 20:40
#146506)

* gh-47005: fix do_open() to let regular headers override unredirected headers

AbstractHTTPHandler.do_open() was building the request header dict by
starting with unredirected_hdrs and only inserting regular headers that
were not already present, giving unredirected headers priority.  This
contradicts get_header() and header_items(), both of which give regular
headers the higher priority.

Fix by unconditionally updating with req.headers so that a header set
via add_header() always overrides one set via add_unredirected_header().

---------

Co-authored-by: Senthil Kumaran <senthil@python.org>
…30598)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@pull pull Bot locked and limited conversation to collaborators Jul 9, 2026
@pull pull Bot added the ⤵️ pull label Jul 9, 2026
@pull pull Bot merged commit bc9bb73 into tj-python:main Jul 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants