{"action":"created","issue":{"url":"https://api.github.com/repos/dblock/waffle/issues/346","repository_url":"https://api.github.com/repos/dblock/waffle","labels_url":"https://api.github.com/repos/dblock/waffle/issues/346/labels{/name}","comments_url":"https://api.github.com/repos/dblock/waffle/issues/346/comments","events_url":"https://api.github.com/repos/dblock/waffle/issues/346/events","html_url":"https://github.com/dblock/waffle/issues/346","id":149471390,"number":346,"title":"Internet Explorer bodyless POST optimization with SPNEGO header and accept-incomplete not handled","user":{"login":"OlivierJaquemet","id":618861,"avatar_url":"https://avatars.githubusercontent.com/u/618861?v=3","gravatar_id":"","url":"https://api.github.com/users/OlivierJaquemet","html_url":"https://github.com/OlivierJaquemet","followers_url":"https://api.github.com/users/OlivierJaquemet/followers","following_url":"https://api.github.com/users/OlivierJaquemet/following{/other_user}","gists_url":"https://api.github.com/users/OlivierJaquemet/gists{/gist_id}","starred_url":"https://api.github.com/users/OlivierJaquemet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OlivierJaquemet/subscriptions","organizations_url":"https://api.github.com/users/OlivierJaquemet/orgs","repos_url":"https://api.github.com/users/OlivierJaquemet/repos","events_url":"https://api.github.com/users/OlivierJaquemet/events{/privacy}","received_events_url":"https://api.github.com/users/OlivierJaquemet/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dblock/waffle/labels/bug?","name":"bug?","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-04-19T14:07:14Z","updated_at":"2016-05-02T15:47:26Z","closed_at":null,"body":"For file upload, Internet Explorer *may* send a bodyless POST request under circumstances described in the following posts :\r\n- https://blogs.msdn.microsoft.com/ieinternals/2010/11/21/challenge-response-authentication-and-zero-length-posts/\r\n- http://stackoverflow.com/questions/20912663/ie10-ie11-upload-fail-not-sending-post-data\r\n\r\nIn such case, the behavior of the server as expected by IE is to send a 401 request to \"re-establish\" the authentication.\r\nHowever, in my observations, when this IE \"optimization\" occurs, the subsequent request\r\n- contains and HTTP header `Authorization: Negotiate`, with an SPNegoTokenTarg message with an `accept-incomplete` negResult\r\n- does not yet contains the file (even though the Content-Length / Content-Type indicates otherwise) (I suppose sent in a third request)\r\n\r\n![internet explorer accept-incomplete](https://cloud.githubusercontent.com/assets/618861/14641742/0818d20e-0648-11e6-9f4c-271b78029664.png)\r\n\r\nLooking at the RFC : https://www.ietf.org/rfc/rfc4178.txt\r\nThe `accept-incomplete` indicates the following : \"At least one additional negotiation message from the peer is needed to establish the security context.\"\r\n\r\nIndeed, the MSDN, documentation for `AcceptSecurityContext` indicates the possible `SEC_I_COMPLETE_AND_CONTINUE` or `SEC_I_COMPLETE_NEEDED` return value which requires additionnal processing :\r\nhttps://msdn.microsoft.com/en-us/library/windows/desktop/aa374705(v=vs.85).aspx\r\n\r\nwaffle-jna implementation in `WindowsAuthProviderImpl.acceptSecurityToken` does not seem to be handling such case :\r\nhttps://github.com/dblock/waffle/blob/60451c353916863d93073a32e88006af28c94412/Source/JNA/waffle-jna/src/main/java/waffle/windows/auth/impl/WindowsAuthProviderImpl.java#L134:L170\r\n\r\n(The result for the end user is an upload failure)"},"comment":{"url":"https://api.github.com/repos/dblock/waffle/issues/comments/216273324","html_url":"https://github.com/dblock/waffle/issues/346#issuecomment-216273324","issue_url":"https://api.github.com/repos/dblock/waffle/issues/346","id":216273324,"user":{"login":"fanste","id":3531183,"avatar_url":"https://avatars.githubusercontent.com/u/3531183?v=3","gravatar_id":"","url":"https://api.github.com/users/fanste","html_url":"https://github.com/fanste","followers_url":"https://api.github.com/users/fanste/followers","following_url":"https://api.github.com/users/fanste/following{/other_user}","gists_url":"https://api.github.com/users/fanste/gists{/gist_id}","starred_url":"https://api.github.com/users/fanste/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fanste/subscriptions","organizations_url":"https://api.github.com/users/fanste/orgs","repos_url":"https://api.github.com/users/fanste/repos","events_url":"https://api.github.com/users/fanste/events{/privacy}","received_events_url":"https://api.github.com/users/fanste/received_events","type":"User","site_admin":false},"created_at":"2016-05-02T15:47:26Z","updated_at":"2016-05-02T15:47:26Z","body":"Thanks for your feedback. I will take a look in the referenced issue and patches."}}