Skip to content
Myr

Fix parse_header_links on empty header

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Remi Rampin · committed by Remi Rampin · parent af9dd61 · Browse files · 1 file+5 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−1 removed

  • other:+5 added−1 removed

1 file+5 added−1 removed

modified:requests/utils.py+5 added-1 removed
741 unmodified lines
742 })743744745def parse_header_links(value):746 """Return a dict of parsed link headers proxies.746 """Return a list of parsed link headers proxies.747748 i.e. Link: <http:/.../front.jpeg>; rel=front; type="image/jpeg",<http://.../back.jpeg>; rel=back;type="image/jpeg"749750 :rtype: list
2 unmodified lines
753 links = []754755 replace_chars = ' \'"'756757 value = value.strip(replace_chars)758 if not value:759 return links760761 for val in re.split(', *<', value):762 try:763 url, params = val.split(';', 1)764 except ValueError:
144 unmodified lines