mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-24 19:22:06 +00:00
[utils] Remove stray undocumented Host header in redirect (fix 46fde7c
)
This commit is contained in:
parent
b2ba24bb02
commit
1fa8b86f0b
1 changed files with 2 additions and 1 deletions
|
@ -2996,7 +2996,8 @@ class YoutubeDLRedirectHandler(compat_urllib_request.HTTPRedirectHandler):
|
|||
# Technically the Cookie header should be in unredirected_hdrs;
|
||||
# however in practice some may set it in normal headers anyway.
|
||||
# We will remove it here to prevent any leaks.
|
||||
remove_headers = ['Cookie']
|
||||
# Also remove unwanted and undocumented Host header for old URL
|
||||
remove_headers = ['Cookie', 'Host']
|
||||
|
||||
# A 303 must either use GET or HEAD for subsequent request
|
||||
# https://datatracker.ietf.org/doc/html/rfc7231#section-6.4.4
|
||||
|
|
Loading…
Reference in a new issue