NTLM authentification loses POST body
I'm trying to send requests to web-service with NTLM authentification by standart way:
-(void)connection:(NSURLConnection*)connection
willSendRequestForAuthenticationChallenge:(NSURLAuthenticationChallenge*)challenge{ if([challenge previousFailureCount]>0){ [[challenge sender] cancelAuthenticationChallenge:challenge]; }else{ NSURLCredential*cred =[NSURLCredential credentialWithUser:username
password:password
persistence:NSURLCredentialPersistenceForSession]; [[challenge sender] useCredential:cred forAuthenticationChallenge:challenge]; }}
GET requests works fine, but there is problem with POST requests. NTLM handshake process loses POST data. It looks like this:
1: iOS -->Web POST {body JSON}2: iOS <--
Web 401Unauthorized WWW-Authenticate: NTLM3: iOS -->Web POST (empty POST request,no body data!) Authorization: NTLM <base64-encoded type-1-message>4: iOS <--
Web 401Unauthorized WWW-Authenticate: NTLM <base64-encoded type-2-message>5: iOS -->Web POST (empty POST request,no body data!) Authorization: NTLM <base64-encoded type-3-message>6: iOS <--
Web 500InternalError(it's normal, because body is empty)
Any ideas?