1
0
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:
Bryan Roe
2022-07-02 01:05:14 -07:00
parent 143f7ef578
commit 44e2dfaae4
2 changed files with 36 additions and 58 deletions

View File

@@ -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(

View File

@@ -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;
}
});
}
}
});