Jacek Caban : wininet: Fixed typo in tests and accompanying implementation.
Module: wine Branch: master Commit: 07e5b87feb9f6160eed536a20d17fc81b9f8d284 URL: http://source.winehq.org/git/wine.git/?a=commit;h=07e5b87feb9f6160eed536a20d... Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon May 14 10:41:31 2012 +0200 wininet: Fixed typo in tests and accompanying implementation. --- dlls/wininet/http.c | 5 ++++- dlls/wininet/tests/http.c | 10 +++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index 90cb286..a0b4a62 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -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) { diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c index 6be48a3..a5c7afe 100644 --- a/dlls/wininet/tests/http.c +++ b/dlls/wininet/tests/http.c @@ -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;
participants (1)
-
Alexandre Julliard