Commit 07e5b87f authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

wininet: Fixed typo in tests and accompanying implementation.

parent 95de085e
......@@ -3424,7 +3424,10 @@ static DWORD HTTP_HttpQueryInfoW(http_request_t *request, DWORD dwInfoLevel,
case HTTP_QUERY_STATUS_CODE: {
DWORD res = ERROR_SUCCESS;
if(request_only || requested_index)
if(request_only)
return ERROR_HTTP_INVALID_QUERY_REQUEST;
if(requested_index)
break;
if(dwInfoLevel & HTTP_QUERY_FLAG_NUMBER) {
......
......@@ -209,15 +209,15 @@ static void _test_status_code(unsigned line, HINTERNET req, DWORD excode)
code = 0xdeadbeef;
index = 1;
size = sizeof(code);
res = HttpQueryInfo(req, HTTP_QUERY_STATUS_CODE||HTTP_QUERY_FLAG_NUMBER, &code, &size, &index);
res = HttpQueryInfo(req, HTTP_QUERY_STATUS_CODE|HTTP_QUERY_FLAG_NUMBER, &code, &size, &index);
ok_(__FILE__,line)(!res && GetLastError() == ERROR_HTTP_HEADER_NOT_FOUND,
"HttpQueryInfo failed: %x(%d)\n", res, GetLastError());
"[invalid 1] HttpQueryInfo failed: %x(%d)\n", res, GetLastError());
code = 0xdeadbeef;
size = sizeof(code);
res = HttpQueryInfo(req, HTTP_QUERY_STATUS_CODE||HTTP_QUERY_FLAG_REQUEST_HEADERS, &code, &size, NULL);
ok_(__FILE__,line)(!res && GetLastError() == ERROR_HTTP_HEADER_NOT_FOUND,
"HttpQueryInfo failed: %x(%d)\n", res, GetLastError());
res = HttpQueryInfo(req, HTTP_QUERY_STATUS_CODE|HTTP_QUERY_FLAG_REQUEST_HEADERS, &code, &size, NULL);
ok_(__FILE__,line)(!res && GetLastError() == ERROR_HTTP_INVALID_QUERY_REQUEST,
"[invalid 2] HttpQueryInfo failed: %x(%d)\n", res, GetLastError());
}
static int close_handle_cnt;
......
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