Commit 2aa3d697 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

wininet: Set status code OK for responses without headers.

parent 0d764893
...@@ -5725,6 +5725,7 @@ static INT HTTP_GetResponseHeaders(http_request_t *request, BOOL clear) ...@@ -5725,6 +5725,7 @@ static INT HTTP_GetResponseHeaders(http_request_t *request, BOOL clear)
heap_free(request->version); heap_free(request->version);
heap_free(request->statusText); heap_free(request->statusText);
request->status_code = HTTP_STATUS_OK;
request->version = heap_strdupW(g_szHttp1_0); request->version = heap_strdupW(g_szHttp1_0);
request->statusText = heap_strdupW(szOK); request->statusText = heap_strdupW(szOK);
......
...@@ -2426,7 +2426,7 @@ static void test_invalid_response_headers(int port) ...@@ -2426,7 +2426,7 @@ static void test_invalid_response_headers(int port)
static void test_response_without_headers(int port) static void test_response_without_headers(int port)
{ {
HINTERNET hi, hc, hr; HINTERNET hi, hc, hr;
DWORD r, count, size, status; DWORD r, count, size;
char buffer[1024]; char buffer[1024];
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
...@@ -2453,12 +2453,7 @@ static void test_response_without_headers(int port) ...@@ -2453,12 +2453,7 @@ static void test_response_without_headers(int port)
todo_wine ok(count == sizeof page1 - 1, "count was wrong\n"); todo_wine ok(count == sizeof page1 - 1, "count was wrong\n");
todo_wine ok(!memcmp(buffer, page1, sizeof page1), "http data wrong\n"); todo_wine ok(!memcmp(buffer, page1, sizeof page1), "http data wrong\n");
status = 0; test_status_code(hr, 200);
size = sizeof(status);
SetLastError(0xdeadbeef);
r = HttpQueryInfo(hr, HTTP_QUERY_STATUS_CODE | HTTP_QUERY_FLAG_NUMBER, &status, &size, NULL );
ok(r, "HttpQueryInfo failed %u\n", GetLastError());
todo_wine ok(status == 200, "expected status 200 got %u\n", status);
buffer[0] = 0; buffer[0] = 0;
size = sizeof(buffer); size = sizeof(buffer);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment