{"action":"created","issue":{"url":"https://api.github.com/repos/codahale/http-handlers/issues/7","labels_url":"https://api.github.com/repos/codahale/http-handlers/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/codahale/http-handlers/issues/7/comments","events_url":"https://api.github.com/repos/codahale/http-handlers/issues/7/events","html_url":"https://github.com/codahale/http-handlers/pull/7","id":55311945,"number":7,"title":"Allow websockets to be used with logging wrapper.","user":{"login":"praboud","id":747924,"avatar_url":"https://avatars.githubusercontent.com/u/747924?v=3","gravatar_id":"","url":"https://api.github.com/users/praboud","html_url":"https://github.com/praboud","followers_url":"https://api.github.com/users/praboud/followers","following_url":"https://api.github.com/users/praboud/following{/other_user}","gists_url":"https://api.github.com/users/praboud/gists{/gist_id}","starred_url":"https://api.github.com/users/praboud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/praboud/subscriptions","organizations_url":"https://api.github.com/users/praboud/orgs","repos_url":"https://api.github.com/users/praboud/repos","events_url":"https://api.github.com/users/praboud/events{/privacy}","received_events_url":"https://api.github.com/users/praboud/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-01-23T17:59:09Z","updated_at":"2015-01-25T19:04:40Z","closed_at":"2015-01-25T19:04:21Z","pull_request":{"url":"https://api.github.com/repos/codahale/http-handlers/pulls/7","html_url":"https://github.com/codahale/http-handlers/pull/7","diff_url":"https://github.com/codahale/http-handlers/pull/7.diff","patch_url":"https://github.com/codahale/http-handlers/pull/7.patch"},"body":"Websocket libraries need the responseWriter to also implement http.Hijacker in order to be able to upgrade the request into a websocket. Currently, the wrapped response in logging doesn't implement it, even if the underlying response does.\r\n\r\nDoing something like this is necessary in order to be able to use logging with websockets. I'm not totally happy with this solution, because you lose a bit of typesafety. Whatever calls Hijack() is thinks that the response actually does implement it, and then it just panics instead. Ideally, the caller should be able to use the `x, ok := r.(http.Hijacker)` idiom to figure out of the underlying response can support Hijack, but I'm not sure if there's any way of doing this."},"comment":{"url":"https://api.github.com/repos/codahale/http-handlers/issues/comments/71386412","html_url":"https://github.com/codahale/http-handlers/pull/7#issuecomment-71386412","issue_url":"https://api.github.com/repos/codahale/http-handlers/issues/7","id":71386412,"user":{"login":"codahale","id":207,"avatar_url":"https://avatars.githubusercontent.com/u/207?v=3","gravatar_id":"","url":"https://api.github.com/users/codahale","html_url":"https://github.com/codahale","followers_url":"https://api.github.com/users/codahale/followers","following_url":"https://api.github.com/users/codahale/following{/other_user}","gists_url":"https://api.github.com/users/codahale/gists{/gist_id}","starred_url":"https://api.github.com/users/codahale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codahale/subscriptions","organizations_url":"https://api.github.com/users/codahale/orgs","repos_url":"https://api.github.com/users/codahale/repos","events_url":"https://api.github.com/users/codahale/events{/privacy}","received_events_url":"https://api.github.com/users/codahale/received_events","type":"User","site_admin":false},"created_at":"2015-01-25T19:04:40Z","updated_at":"2015-01-25T19:04:40Z","body":"Yes, sorry—I missed the fact that you’d added a commit."}}