{"action":"created","issue":{"url":"https://api.github.com/repos/python-hyper/h11/issues/57","repository_url":"https://api.github.com/repos/python-hyper/h11","labels_url":"https://api.github.com/repos/python-hyper/h11/issues/57/labels{/name}","comments_url":"https://api.github.com/repos/python-hyper/h11/issues/57/comments","events_url":"https://api.github.com/repos/python-hyper/h11/issues/57/events","html_url":"https://github.com/python-hyper/h11/issues/57","id":306890850,"number":57,"title":"Fails to decode a header that requests can handle","user":{"login":"miracle2k","id":13807,"avatar_url":"https://avatars1.githubusercontent.com/u/13807?v=4","gravatar_id":"","url":"https://api.github.com/users/miracle2k","html_url":"https://github.com/miracle2k","followers_url":"https://api.github.com/users/miracle2k/followers","following_url":"https://api.github.com/users/miracle2k/following{/other_user}","gists_url":"https://api.github.com/users/miracle2k/gists{/gist_id}","starred_url":"https://api.github.com/users/miracle2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miracle2k/subscriptions","organizations_url":"https://api.github.com/users/miracle2k/orgs","repos_url":"https://api.github.com/users/miracle2k/repos","events_url":"https://api.github.com/users/miracle2k/events{/privacy}","received_events_url":"https://api.github.com/users/miracle2k/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-03-20T14:31:03Z","updated_at":"2018-03-21T07:03:51Z","closed_at":null,"author_association":"NONE","body":"I am trying to read this url\r\n\r\n`https://www.bitstamp.net/api/v2/trading-pairs-info/`\r\n\r\nIt fails (see https://github.com/theelous3/asks/issues/60) with an exception:\r\n\r\n```\r\n....\r\n  File \"/Users/michael/.pyenv/versions/3.6.3/lib/python3.6/site-packages/h11/_readers.py\", line 85, in maybe_read_from_SEND_RESPONSE_server\r\n    return class_(headers=list(_decode_header_lines(lines[1:])),\r\n  File \"/Users/michael/.pyenv/versions/3.6.3/lib/python3.6/site-packages/h11/_readers.py\", line 55, in _decode_header_lines\r\n    matches = validate(header_field_re, line)\r\n  File \"/Users/michael/.pyenv/versions/3.6.3/lib/python3.6/site-packages/h11/_util.py\", line 96, in validate\r\n    raise LocalProtocolError(msg)\r\n```\r\n\r\nLooking closer, this is the header that seems to cause trouble:\r\n\r\n```bytearray(b'Set-Cookie: ___utmvafIumyLc=kUd\\x01UpAt; path=/; Max-Age=900')```\r\n\r\nMy guess is it's the ``\\x``."},"comment":{"url":"https://api.github.com/repos/python-hyper/h11/issues/comments/374848641","html_url":"https://github.com/python-hyper/h11/issues/57#issuecomment-374848641","issue_url":"https://api.github.com/repos/python-hyper/h11/issues/57","id":374848641,"user":{"login":"Lukasa","id":1382556,"avatar_url":"https://avatars1.githubusercontent.com/u/1382556?v=4","gravatar_id":"","url":"https://api.github.com/users/Lukasa","html_url":"https://github.com/Lukasa","followers_url":"https://api.github.com/users/Lukasa/followers","following_url":"https://api.github.com/users/Lukasa/following{/other_user}","gists_url":"https://api.github.com/users/Lukasa/gists{/gist_id}","starred_url":"https://api.github.com/users/Lukasa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lukasa/subscriptions","organizations_url":"https://api.github.com/users/Lukasa/orgs","repos_url":"https://api.github.com/users/Lukasa/repos","events_url":"https://api.github.com/users/Lukasa/events{/privacy}","received_events_url":"https://api.github.com/users/Lukasa/received_events","type":"User","site_admin":false},"created_at":"2018-03-21T07:03:51Z","updated_at":"2018-03-21T07:03:51Z","author_association":"OWNER","body":"h2 does indeed validate header fields, but its validation is quite cautious. In its case it does allow all the characters you’re mentioning, which could well be considered a bug. "}}
{"actor":{"display_login":"Lukasa"}}