Commit 6435f844 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

winhttp: Set last error in WinHttpQueryAuthSchemes when no auth scheme is found.

parent f7620887
......@@ -965,6 +965,7 @@ BOOL WINAPI WinHttpQueryAuthSchemes( HINTERNET hrequest, LPDWORD supported, LPDW
*target = WINHTTP_AUTH_TARGET_PROXY;
ret = TRUE;
}
else set_last_error( ERROR_INVALID_OPERATION );
release_object( &request->hdr );
if (ret) set_last_error( ERROR_SUCCESS );
......
......@@ -2441,7 +2441,7 @@ static void test_basic_request(int port, const WCHAR *verb, const WCHAR *path)
ret = WinHttpQueryAuthSchemes(req, &supported, &first, &target);
error = GetLastError();
ok(!ret, "unexpected success\n");
todo_wine ok(error == ERROR_INVALID_OPERATION, "expected ERROR_INVALID_OPERATION, got %u\n", error);
ok(error == ERROR_INVALID_OPERATION, "expected ERROR_INVALID_OPERATION, got %u\n", error);
ok(supported == 0xdeadbeef, "got %x\n", supported);
ok(first == 0xdeadbeef, "got %x\n", first);
ok(target == 0xdeadbeef, "got %x\n", target);
......@@ -2528,7 +2528,7 @@ static void test_basic_authentication(int port)
ret = WinHttpQueryAuthSchemes(req, &supported, &first, &target);
error = GetLastError();
ok(!ret, "expected failure\n");
todo_wine ok(error == ERROR_INVALID_OPERATION, "expected ERROR_INVALID_OPERATION, got %u\n", error);
ok(error == ERROR_INVALID_OPERATION, "expected ERROR_INVALID_OPERATION, got %u\n", error);
ok(supported == 0xdeadbeef, "got %x\n", supported);
ok(first == 0xdeadbeef, "got %x\n", first);
ok(target == 0xdeadbeef, "got %x\n", target);
......
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