Closed jackgeek closed 7 years ago
This is a real problem. It crashes node.js when it occurs.
The problem is as following:
On sendType3Message
function, parseType2Message is called without the second parameter, which is the callback:
// parse type2 message from server:
var type2msg = ntlm.parseType2Message(res.headers['www-authenticate']);
while parseType2Message function is declared as:
function parseType2Message(rawmsg, callback){
var match = rawmsg.match(/NTLM (.+)?/);
if(!match || !match[1])
return callback(new Error("Couldn't find NTLM in the message type2 comming from the server"));
and callback is called while it's undefined.
It's not clear to me how this error should be handled, but it definitely shouldn't crash the application as it does now.
When using to connect to an application served by IIS, after an IISRESET it fails with the following exception the first few times I try to connect: