{"action":"created","issue":{"url":"https://api.github.com/repos/PowerDMS/Owin.Scim/issues/37","repository_url":"https://api.github.com/repos/PowerDMS/Owin.Scim","labels_url":"https://api.github.com/repos/PowerDMS/Owin.Scim/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/PowerDMS/Owin.Scim/issues/37/comments","events_url":"https://api.github.com/repos/PowerDMS/Owin.Scim/issues/37/events","html_url":"https://github.com/PowerDMS/Owin.Scim/pull/37","id":185297129,"number":37,"title":"Bug fix: Content-Type was already added to dictionary","user":{"login":"kchlapinski","id":19343110,"avatar_url":"https://avatars.githubusercontent.com/u/19343110?v=3","gravatar_id":"","url":"https://api.github.com/users/kchlapinski","html_url":"https://github.com/kchlapinski","followers_url":"https://api.github.com/users/kchlapinski/followers","following_url":"https://api.github.com/users/kchlapinski/following{/other_user}","gists_url":"https://api.github.com/users/kchlapinski/gists{/gist_id}","starred_url":"https://api.github.com/users/kchlapinski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kchlapinski/subscriptions","organizations_url":"https://api.github.com/users/kchlapinski/orgs","repos_url":"https://api.github.com/users/kchlapinski/repos","events_url":"https://api.github.com/users/kchlapinski/events{/privacy}","received_events_url":"https://api.github.com/users/kchlapinski/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-26T04:55:21Z","updated_at":"2016-10-26T17:23:18Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/PowerDMS/Owin.Scim/pulls/37","html_url":"https://github.com/PowerDMS/Owin.Scim/pull/37","diff_url":"https://github.com/PowerDMS/Owin.Scim/pull/37.diff","patch_url":"https://github.com/PowerDMS/Owin.Scim/pull/37.patch"},"body":""},"comment":{"url":"https://api.github.com/repos/PowerDMS/Owin.Scim/issues/comments/256418537","html_url":"https://github.com/PowerDMS/Owin.Scim/pull/37#issuecomment-256418537","issue_url":"https://api.github.com/repos/PowerDMS/Owin.Scim/issues/37","id":256418537,"user":{"login":"Cephei","id":1054639,"avatar_url":"https://avatars.githubusercontent.com/u/1054639?v=3","gravatar_id":"","url":"https://api.github.com/users/Cephei","html_url":"https://github.com/Cephei","followers_url":"https://api.github.com/users/Cephei/followers","following_url":"https://api.github.com/users/Cephei/following{/other_user}","gists_url":"https://api.github.com/users/Cephei/gists{/gist_id}","starred_url":"https://api.github.com/users/Cephei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cephei/subscriptions","organizations_url":"https://api.github.com/users/Cephei/orgs","repos_url":"https://api.github.com/users/Cephei/repos","events_url":"https://api.github.com/users/Cephei/events{/privacy}","received_events_url":"https://api.github.com/users/Cephei/received_events","type":"User","site_admin":false},"created_at":"2016-10-26T17:23:18Z","updated_at":"2016-10-26T17:23:18Z","body":"Thanks for the push @kchlapinski. I'll look into this today and re-familiarize myself with the issue. In recent memory, our team has experienced issues with mutating headers within OWIN. To the best of my knowledge, it is due to whether or not WebApi is streaming or buffering the output. This is decided within your implementation of IHostBufferPolicySelector or the WebApi default.\r\n\r\nWhen a response is being streamed, its headers are sent immediately from within Microsoft's Katana HttpMessageHandlerAdapter.cs. Once that happens, you cannot modify the content header collection or an exception occurs. (see http://aspnetwebstack.codeplex.com/SourceControl/latest#src/System.Web.Http.Owin/HttpMessageHandlerAdapter.cs)\r\n\r\nIt's not the easiest to tell whether or not headers have already been sent. MS gives you no public property on the response object. However, you can subscribe to the response.OnSendingHeaders callback. Internally, in our own product, we make note of this in an ambient context using the owinEnvironment. So when an exception bubbles up to Owin's exception handler, we can know whether it's safe to modify the response content / headers."}}
{"actor":{"display_login":"Cephei"}}