mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-18 17:23:16 +00:00
Fixed Digest Unit test issue with persistent connections
Removed debug lines
This commit is contained in:
@@ -1871,10 +1871,6 @@ ILibWebClient_DataResults ILibWebClient_OnData(ILibAsyncSocket_SocketModule sock
|
||||
ILibDestructPacket(wcdo->header);
|
||||
wcdo->header = tph;
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// printf("WCDO/HEADER was NULL\n");
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2216,6 +2212,7 @@ void ILibWebClient_OnDisconnectSink(ILibAsyncSocket_SocketModule socketModule, v
|
||||
wcdo->FinHeader = 0;
|
||||
h = wcdo->header;
|
||||
wcdo->header = NULL;
|
||||
|
||||
if (wr != NULL && wr->OnResponse != NULL)
|
||||
{
|
||||
wr->OnResponse(
|
||||
|
||||
@@ -235,37 +235,17 @@ server.on('request', function (imsg, rsp)
|
||||
username = imsg.Digest_GetUsername();
|
||||
qop = imsg.Digest_GetQOP();
|
||||
|
||||
imsg.on('end', function ()
|
||||
{
|
||||
switch (imsg.url)
|
||||
{
|
||||
case '/':
|
||||
if (imsg.Digest_ValidatePassword(digest_password))
|
||||
{
|
||||
rsp.statusCode = 200;
|
||||
rsp.setHeader('Content-Type', 'text/html');
|
||||
rsp.end('<html>Success!</html>');
|
||||
}
|
||||
else
|
||||
{
|
||||
rsp.Digest_writeUnauthorized(digest_realm);
|
||||
}
|
||||
break;
|
||||
case '/auth':
|
||||
if (qop != 'auth') { promises.digest_auth.reject('Received Incorrect QOP: ' + qop); }
|
||||
if (imsg.Digest_ValidatePassword(digest_password))
|
||||
{
|
||||
rsp.statusCode = 200;
|
||||
rsp.setHeader('Content-Type', 'text/html');
|
||||
rsp.end('<html>Success!</html>');
|
||||
}
|
||||
else
|
||||
{
|
||||
rsp.Digest_writeUnauthorized(digest_realm, { qop: 'auth' });
|
||||
}
|
||||
break;
|
||||
case '/auth-int':
|
||||
if (qop != 'auth-int') { promises.digest_authint.reject('Received Incorrect QOP: ' + qop); }
|
||||
imsg.on('end', function ()
|
||||
{
|
||||
break;
|
||||
}
|
||||
if (imsg.Digest_ValidatePassword(digest_password))
|
||||
{
|
||||
rsp.statusCode = 200;
|
||||
@@ -277,10 +257,10 @@ server.on('request', function (imsg, rsp)
|
||||
rsp.Digest_writeUnauthorized(digest_realm);
|
||||
}
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
imsg.on('end', function ()
|
||||
{
|
||||
switch (imsg.url)
|
||||
{
|
||||
@@ -294,6 +274,7 @@ server.on('request', function (imsg, rsp)
|
||||
rsp.Digest_writeUnauthorized(digest_realm, { qop: 'auth-int, auth' });
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user