mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-03-03 04:39:23 +00:00
[docs] Misc Cleanup (#8977)
Closes #8355, #8944 Authored by: bashonly, Grub4k, Arthurszzz, seproDev, pukkandan Co-authored-by: sepro <4618135+seproDev@users.noreply.github.com> Co-authored-by: bashonly <bashonly@protonmail.com> Co-authored-by: Arthurszzz <minecraftgamerarthur@gmail.com> Co-authored-by: Simon Sawicki <accounts@grub4k.xyz> Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
This commit is contained in:
@@ -167,7 +167,7 @@ class HTTPHandler(urllib.request.AbstractHTTPHandler):
|
||||
if 300 <= resp.code < 400:
|
||||
location = resp.headers.get('Location')
|
||||
if location:
|
||||
# As of RFC 2616 default charset is iso-8859-1 that is respected by python 3
|
||||
# As of RFC 2616 default charset is iso-8859-1 that is respected by Python 3
|
||||
location = location.encode('iso-8859-1').decode()
|
||||
location_escaped = normalize_url(location)
|
||||
if location != location_escaped:
|
||||
|
||||
@@ -446,7 +446,7 @@ class Request:
|
||||
|
||||
@headers.setter
|
||||
def headers(self, new_headers: Mapping):
|
||||
"""Replaces headers of the request. If not a CaseInsensitiveDict, it will be converted to one."""
|
||||
"""Replaces headers of the request. If not a HTTPHeaderDict, it will be converted to one."""
|
||||
if isinstance(new_headers, HTTPHeaderDict):
|
||||
self._headers = new_headers
|
||||
elif isinstance(new_headers, Mapping):
|
||||
|
||||
Reference in New Issue
Block a user