wininet: Fixed typo in tests and accompanying implementation.
This commit is contained in:
parent
95de085e5e
commit
07e5b87feb
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue