mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-09-10 00:58:17 +02:00
[utils] Comment cookie processing until result from travis and some more testing
This commit is contained in:
parent
12bbd32ad0
commit
e28034c5ac
@ -793,14 +793,14 @@ def http_response(self, request, response):
|
|||||||
# https://github.com/rg3/youtube-dl/issues/6769).
|
# https://github.com/rg3/youtube-dl/issues/6769).
|
||||||
# In order to at least prevent crashing we will percent encode Set-Cookie
|
# In order to at least prevent crashing we will percent encode Set-Cookie
|
||||||
# header before HTTPCookieProcessor starts processing it.
|
# header before HTTPCookieProcessor starts processing it.
|
||||||
if sys.version_info < (3, 0) and response.headers:
|
# if sys.version_info < (3, 0) and response.headers:
|
||||||
for set_cookie_header in ('Set-Cookie', 'Set-Cookie2'):
|
# for set_cookie_header in ('Set-Cookie', 'Set-Cookie2'):
|
||||||
set_cookie = response.headers.get(set_cookie_header)
|
# set_cookie = response.headers.get(set_cookie_header)
|
||||||
if set_cookie:
|
# if set_cookie:
|
||||||
set_cookie_escaped = compat_urllib_parse.quote(set_cookie, b"%/;:@&=+$,!~*'()?#[] ")
|
# set_cookie_escaped = compat_urllib_parse.quote(set_cookie, b"%/;:@&=+$,!~*'()?#[] ")
|
||||||
if set_cookie != set_cookie_escaped:
|
# if set_cookie != set_cookie_escaped:
|
||||||
del response.headers[set_cookie_header]
|
# del response.headers[set_cookie_header]
|
||||||
response.headers[set_cookie_header] = set_cookie_escaped
|
# response.headers[set_cookie_header] = set_cookie_escaped
|
||||||
return compat_urllib_request.HTTPCookieProcessor.http_response(self, request, response)
|
return compat_urllib_request.HTTPCookieProcessor.http_response(self, request, response)
|
||||||
|
|
||||||
https_request = compat_urllib_request.HTTPCookieProcessor.http_request
|
https_request = compat_urllib_request.HTTPCookieProcessor.http_request
|
||||||
|
Loading…
Reference in New Issue
Block a user