winhttp/tests: Close the connection immediately after authentication.

This commit is contained in:
Hans Leidekker 2014-12-09 12:50:41 +01:00 committed by Alexandre Julliard
parent 2087a9fbe9
commit bb89483397
1 changed files with 7 additions and 1 deletions

View File

@ -1812,6 +1812,12 @@ static const char noauthmsg[] =
"WWW-Authenticate: Basic realm=\"placebo\"\r\n"
"\r\n";
static const char okauthmsg[] =
"HTTP/1.1 200 OK\r\n"
"Server: winetest\r\n"
"Connection: close\r\n"
"\r\n";
struct server_info
{
HANDLE event;
@ -1873,7 +1879,7 @@ static DWORD CALLBACK server_thread(LPVOID param)
if (strstr(buffer, "/auth"))
{
if (strstr(buffer, "Authorization: Basic dXNlcjpwd2Q="))
send(c, okmsg, sizeof okmsg - 1, 0);
send(c, okauthmsg, sizeof okauthmsg - 1, 0);
else
send(c, noauthmsg, sizeof noauthmsg - 1, 0);
}