[issue46439] Clarify urllib.request.add_header documentation

2022-01-21 Thread Ashwin Ramaswami
Ashwin Ramaswami added the comment: Yes -- additionally, since other http libraries (I believe) usually don't forward headers on redirections by default, the default for urllib.request is counterintuitive (and maybe even not ideal for security reasons?) and would benefit from additional

[issue46439] Clarify urllib.request.add_header documentation

2022-01-21 Thread Éric Araujo
Éric Araujo added the comment: I think the doc assumes that people will expect headers to be added for redirections, and if not the existence of the method `add_unredirected_header` that’s documented just after would tell it. That said, the addition does no harm, so why not be explicit.

[issue46439] Clarify urllib.request.add_header documentation

2022-01-19 Thread Ashwin Ramaswami
Change by Ashwin Ramaswami : -- keywords: +patch pull_requests: +28904 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30708 ___ Python tracker

[issue46439] Clarify urllib.request.add_header documentation

2022-01-19 Thread Ashwin Ramaswami
New submission from Ashwin Ramaswami : We should add a note that headers added via urllib.request.add_header are added to redirected requests. It isn't immediately clear upon reading the documentation that this is the case. -- assignee: docs@python components: Documentation messages: