Skip to content

gh-89735: Document requirements for the *headers* argument - #155640

Open
serhiy-storchaka wants to merge 1 commit into
python:mainfrom
serhiy-storchaka:urllib-auth-headers-doc
Open

gh-89735: Document requirements for the *headers* argument#155640
serhiy-storchaka wants to merge 1 commit into
python:mainfrom
serhiy-storchaka:urllib-auth-headers-doc

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Aug 12, 2026

Copy link
Copy Markdown
Member

AbstractBasicAuthHandler.http_error_auth_reqed() looks up headers.get_all('www-authenticate') and AbstractDigestAuthHandler.http_error_auth_reqed() looks up headers.get('www-authenticate'), both with a lowercase name.
A plain dict therefore does not work: it has no get_all(), and its lookup is case-sensitive, so the header is silently not found.

🤖 Generated with Claude Code

Both handlers look up the header name in lowercase, and the basic
one needs get_all(), so a plain dict does not work.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #34037724 | 📁 Comparing 4ac90ba against main (3f99ebe)

  🔍 Preview build  

1 file changed
± library/urllib.request.html

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

Labels

awaiting core review docs Documentation in the Doc dir needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant