{"action":"created","issue":{"url":"https://api.github.com/repos/kennethreitz/requests/issues/2707","labels_url":"https://api.github.com/repos/kennethreitz/requests/issues/2707/labels{/name}","comments_url":"https://api.github.com/repos/kennethreitz/requests/issues/2707/comments","events_url":"https://api.github.com/repos/kennethreitz/requests/issues/2707/events","html_url":"https://github.com/kennethreitz/requests/issues/2707","id":99147163,"number":2707,"title":"parse_header_links fails for momento link headers","user":{"login":"jayvdb","id":15092,"avatar_url":"https://avatars.githubusercontent.com/u/15092?v=3","gravatar_id":"","url":"https://api.github.com/users/jayvdb","html_url":"https://github.com/jayvdb","followers_url":"https://api.github.com/users/jayvdb/followers","following_url":"https://api.github.com/users/jayvdb/following{/other_user}","gists_url":"https://api.github.com/users/jayvdb/gists{/gist_id}","starred_url":"https://api.github.com/users/jayvdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jayvdb/subscriptions","organizations_url":"https://api.github.com/users/jayvdb/orgs","repos_url":"https://api.github.com/users/jayvdb/repos","events_url":"https://api.github.com/users/jayvdb/events{/privacy}","received_events_url":"https://api.github.com/users/jayvdb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-05T08:05:52Z","updated_at":"2015-08-05T13:35:17Z","closed_at":null,"body":"The link header for http://ws-dl-05.cs.odu.edu/demo/index.php/Tyrion_Lannister is not being parsed correctly by `parse_header_links`, and that function doesnt look completely RFC 5988 compliant.\r\n\r\n```\r\n>>> r = requests.get('http://ws-dl-05.cs.odu.edu/demo/index.php/Tyrion_Lannister')\r\n>>> r.headers['link']\r\n'<http://ws-dl-05.cs.odu.edu/demo/index.php/Tyrion_Lannister>; rel=\"original latest-version\",<http://ws-dl-05.cs.odu.edu/demo/index.php/Special:TimeGate/Tyrion_Lannister>; rel=\"timegate\",<http://ws-dl-05.cs.odu.edu/demo/index.php/Special:TimeMap/Tyrion_Lannister>; rel=\"timemap\"; type=\"application/link-format\"; from=\"Mon, 23 Apr 2007 20:26:15 GMT\"; until=\"Fri, 06 Sep 2013 17:19:06 GMT\",<http://ws-dl-05.cs.odu.edu/demo/index.php?title=Tyrion_Lannister&oldid=1714>; rel=\"first memento\"; datetime=\"Mon, 23 Apr 2007 20:26:15 GMT\",<http://ws-dl-05.cs.odu.edu/demo/index.php?title=Tyrion_Lannister&oldid=107222>; rel=\"last memento\"; datetime=\"Fri, 06 Sep 2013 17:19:06 GMT\"'\r\n\r\n>>> pp = pprint.PrettyPrinter(indent=4)\r\n>>> pp.pprint(r.links)\r\n{   '06 Sep 2013 17:19:06 GMT': {   'url': '06 Sep 2013 17:19:06 GMT'},\r\n    '23 Apr 2007 20:26:15 GMT': {   'url': '23 Apr 2007 20:26:15 GMT'},\r\n    'first memento': {   'datetime': 'Mon',\r\n                         'rel': 'first memento',\r\n                         'url': 'http://ws-dl-05.cs.odu.edu/demo/index.php?title=Tyrion_Lannister&oldid=1714'},\r\n    'last memento': {   'datetime': 'Fri',\r\n                        'rel': 'last memento',\r\n                        'url': 'http://ws-dl-05.cs.odu.edu/demo/index.php?title=Tyrion_Lannister&oldid=107222'},\r\n    'original latest-version': {   'rel': 'original latest-version',\r\n                                   'url': 'http://ws-dl-05.cs.odu.edu/demo/index.php/Tyrion_Lannister'},\r\n    'timegate': {   'rel': 'timegate',\r\n                    'url': 'http://ws-dl-05.cs.odu.edu/demo/index.php/Special:TimeGate/Tyrion_Lannister'},\r\n    'timemap': {   'from': 'Mon',\r\n                   'rel': 'timemap',\r\n                   'type': 'application/link-format',\r\n                   'url': 'http://ws-dl-05.cs.odu.edu/demo/index.php/Special:TimeMap/Tyrion_Lannister'}}\r\n```\r\n\r\nOddly this was the subject of #2250, as it appears the comma's are still causing the problem, so it may be that some corner cases still need to be handled better, and some unit tests written to confirm the problem is actually solved.  Happy to help with either."},"comment":{"url":"https://api.github.com/repos/kennethreitz/requests/issues/comments/127998487","html_url":"https://github.com/kennethreitz/requests/issues/2707#issuecomment-127998487","issue_url":"https://api.github.com/repos/kennethreitz/requests/issues/2707","id":127998487,"user":{"login":"sigmavirus24","id":240830,"avatar_url":"https://avatars.githubusercontent.com/u/240830?v=3","gravatar_id":"","url":"https://api.github.com/users/sigmavirus24","html_url":"https://github.com/sigmavirus24","followers_url":"https://api.github.com/users/sigmavirus24/followers","following_url":"https://api.github.com/users/sigmavirus24/following{/other_user}","gists_url":"https://api.github.com/users/sigmavirus24/gists{/gist_id}","starred_url":"https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sigmavirus24/subscriptions","organizations_url":"https://api.github.com/users/sigmavirus24/orgs","repos_url":"https://api.github.com/users/sigmavirus24/repos","events_url":"https://api.github.com/users/sigmavirus24/events{/privacy}","received_events_url":"https://api.github.com/users/sigmavirus24/received_events","type":"User","site_admin":false},"created_at":"2015-08-05T13:35:17Z","updated_at":"2015-08-05T13:35:17Z","body":"And to be clear we explicitly aren't 5988 complaint because Kenneth decided he did not want to handle the case where one rel could have multiple links. There's an effort to add that to the requests-toolbelt though."}}