I'm using Node.js to connect to Server with NTLM Authentication. As the NTLM protocol steps below(refer: http://www.innovation.ch/personal/ronald/ntlm.html).
1: C --> S GET ...
2: C <-- S 401 Unauthorized
WWW-Authenticate: NTLM
3: C --> S GET ...
Authorization: NTLM <base64-encoded type-1-message>
4: C <-- S 401 Unauthorized
WWW-Authenticate: NTLM <base64-encoded type-2-message>
5: C --> S GET ...
Authorization: NTLM <base64-encoded type-3-message>
6: C <-- S 200 Ok
the 1-5 step works fine, but in the 6th step, the server didn't return me with 200 OK, but returned me with status code 401, and with headers:
HEADS: {
'content-type': 'text/html',
server: 'Microsoft-IIS/8.0',
'www-authenticate': 'Negotiate, NTLM',
'x-powered-by': 'ASP.NET',
date: 'Sat, 12 Jul 2014 06:44:25 GMT',
'content-length': '1293'
}
Is there anything wrong? Could you help me? Why doesn't it return 200 OK and correct response body? Thanks very much