Improve documentation
This commit is contained in:
@@ -108,7 +108,7 @@ def parse_headers(lines):
|
||||
break
|
||||
|
||||
while True:
|
||||
if line in ("\r\n", "\n", ""):
|
||||
if line in ("\r\n", "\r", "\n", ""):
|
||||
break
|
||||
|
||||
if line[0].isspace():
|
||||
@@ -189,14 +189,14 @@ def get_uri(url: str):
|
||||
|
||||
def urljoin(base, url):
|
||||
"""
|
||||
Join a base url and a URL to form an absolute url.
|
||||
Join a base url, and a URL to form an absolute url.
|
||||
"""
|
||||
return urllib.parse.urljoin(base, url)
|
||||
|
||||
|
||||
def get_charset(headers: Dict[str, str]):
|
||||
"""
|
||||
Returns the charset of the content from the headers if found. Otherwise returns `FORMAT`
|
||||
Returns the charset of the content from the headers if found. Otherwise, returns `FORMAT`
|
||||
|
||||
@param headers: the headers to retrieve the charset from
|
||||
@return: A charset
|
||||
|
Reference in New Issue
Block a user