mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
Merge pull request #1355 from sigmavirus24/fix_links
Prevent a KeyError when there's no link headers
This commit is contained in:
+1
-1
@@ -646,7 +646,7 @@ class Response(object):
|
||||
def links(self):
|
||||
"""Returns the parsed header links of the response, if any."""
|
||||
|
||||
header = self.headers['link']
|
||||
header = self.headers.get('link')
|
||||
|
||||
# l = MultiDict()
|
||||
l = {}
|
||||
|
||||
Reference in New Issue
Block a user