{"action":"created","issue":{"url":"https://api.github.com/repos/snoyberg/http-client/issues/252","repository_url":"https://api.github.com/repos/snoyberg/http-client","labels_url":"https://api.github.com/repos/snoyberg/http-client/issues/252/labels{/name}","comments_url":"https://api.github.com/repos/snoyberg/http-client/issues/252/comments","events_url":"https://api.github.com/repos/snoyberg/http-client/issues/252/events","html_url":"https://github.com/snoyberg/http-client/issues/252","id":198036854,"number":252,"title":"Invalid header type: 72","user":{"login":"creichert","id":526560,"avatar_url":"https://avatars.githubusercontent.com/u/526560?v=3","gravatar_id":"","url":"https://api.github.com/users/creichert","html_url":"https://github.com/creichert","followers_url":"https://api.github.com/users/creichert/followers","following_url":"https://api.github.com/users/creichert/following{/other_user}","gists_url":"https://api.github.com/users/creichert/gists{/gist_id}","starred_url":"https://api.github.com/users/creichert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/creichert/subscriptions","organizations_url":"https://api.github.com/users/creichert/orgs","repos_url":"https://api.github.com/users/creichert/repos","events_url":"https://api.github.com/users/creichert/events{/privacy}","received_events_url":"https://api.github.com/users/creichert/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-12-29T16:55:18Z","updated_at":"2016-12-29T22:54:07Z","closed_at":null,"body":"I recently opened an issue here: https://github.com/vincenthz/hs-tls/issues/179\r\n\r\nThe contributors suggested opening this issue on this repo and I am a little lost on where to proceed.\r\n\r\n---\r\n\r\nWhen making some vanilla calls to the stripe api, I receive some bizarre errors. I've done some sanity checking throughout my code with no luck.\r\n\r\nThis error happens roughly 35% of the time:\r\n\r\n```\r\nTlsExceptionHostPort (HandshakeFailed (Error_Packet_Parsing \"Failed reading: invalid header type: 72\\nFrom:\\theader\\n\\n\")) \"api.stripe.com\" 443\r\n```\r\n\r\n---\r\n\r\nThere's a lot of information given in that issue of steps I tried to debug. One conclusion given from a contributor of `tls` said that:\r\n\r\n> The TLS client HELLO is preceded by an \"encrypted alert\", most likely a \"close notify\". Most likely you're sending the \"close notify\" alert for an earlier TLS connection down the wrong open socket! This can happen if the underlying socket is closed (and its file descriptor recycled for a new connection) before the associated TLS object was cleaned up. There are likely also other ways of mixing up file descriptors.\r\n\r\nThis error is non-deterministic and I'm still trying to come up with a good reproducible test case. Any help with debug tips or places I can check would be helpful, thanks."},"comment":{"url":"https://api.github.com/repos/snoyberg/http-client/issues/comments/269706365","html_url":"https://github.com/snoyberg/http-client/issues/252#issuecomment-269706365","issue_url":"https://api.github.com/repos/snoyberg/http-client/issues/252","id":269706365,"user":{"login":"vdukhovni","id":1107986,"avatar_url":"https://avatars.githubusercontent.com/u/1107986?v=3","gravatar_id":"","url":"https://api.github.com/users/vdukhovni","html_url":"https://github.com/vdukhovni","followers_url":"https://api.github.com/users/vdukhovni/followers","following_url":"https://api.github.com/users/vdukhovni/following{/other_user}","gists_url":"https://api.github.com/users/vdukhovni/gists{/gist_id}","starred_url":"https://api.github.com/users/vdukhovni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vdukhovni/subscriptions","organizations_url":"https://api.github.com/users/vdukhovni/orgs","repos_url":"https://api.github.com/users/vdukhovni/repos","events_url":"https://api.github.com/users/vdukhovni/events{/privacy}","received_events_url":"https://api.github.com/users/vdukhovni/received_events","type":"User","site_admin":false},"created_at":"2016-12-29T22:54:07Z","updated_at":"2016-12-29T22:54:07Z","body":"Possible source of problem in http-client: https://github.com/snoyberg/http-client/issues/252"}}
{"actor":{"display_login":"vdukhovni"}}