Signed-off-by: Haoyang Chen chenhaoyang@uniontech.com --- dlls/winhttp/session.c | 5 +++-- dlls/winhttp/tests/winhttp.c | 10 ++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/dlls/winhttp/session.c b/dlls/winhttp/session.c index 319066db55b..f052c3c569c 100644 --- a/dlls/winhttp/session.c +++ b/dlls/winhttp/session.c @@ -1854,7 +1854,7 @@ static BOOL run_script( char *script, DWORD size, const WCHAR *url, WINHTTP_PROX uc.dwStructSize = sizeof(uc); uc.dwHostNameLength = -1;
- if (WinHttpCrackUrl( url, 0, 0, &uc )) + if ((ret = WinHttpCrackUrl( url, 0, 0, &uc ))) { char *hostnameA = strdupWA_sized( uc.lpszHostName, uc.dwHostNameLength );
@@ -1868,7 +1868,8 @@ static BOOL run_script( char *script, DWORD size, const WCHAR *url, WINHTTP_PROX heap_free( hostnameA ); } heap_free( urlA ); - return InternetDeInitializeAutoProxyDll( NULL, 0 ); + InternetDeInitializeAutoProxyDll( NULL, 0 ); + return ret; }
/*********************************************************************** diff --git a/dlls/winhttp/tests/winhttp.c b/dlls/winhttp/tests/winhttp.c index 6a61a23ec02..56f35252615 100644 --- a/dlls/winhttp/tests/winhttp.c +++ b/dlls/winhttp/tests/winhttp.c @@ -4974,6 +4974,9 @@ static void test_WinHttpGetProxyForUrl(void) trace("Proxy.ProxyBypass=%s\n", wine_dbgstr_w(info.lpszProxyBypass)); GlobalFree( info.lpszProxy ); GlobalFree( info.lpszProxyBypass ); + + ret = WinHttpGetProxyForUrl( session, L"http:", &options, &info ); + ok( !ret, "expected failure\n" ); }
options.dwFlags = WINHTTP_AUTOPROXY_CONFIG_URL; @@ -4990,6 +4993,13 @@ static void test_WinHttpGetProxyForUrl(void) GlobalFree( info.lpszProxy ); GlobalFree( info.lpszProxyBypass ); } + + options.dwFlags = WINHTTP_AUTOPROXY_AUTO_DETECT; + options.dwAutoDetectFlags = WINHTTP_AUTO_DETECT_TYPE_DHCP|WINHTTP_AUTO_DETECT_TYPE_DNS_A; + + ret = WinHttpGetProxyForUrl( session, L"http:", &options, &info ); + ok( !ret, "expected failure\n" ); + WinHttpCloseHandle( session ); }
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=88398
Your paranoid android.
=== w2008s64 (32 bit report) ===
winhttp: winhttp.c:2512: Test failed: failed to receive response 12152 winhttp.c:2517: Test failed: failed to query status code 12019 winhttp.c:2518: Test failed: request failed unexpectedly 3735928559 winhttp.c:2533: Test failed: failed to query for raw headers: 12019 winhttp.c:2534: Test failed: WinHttpQueryHeaders returned invalid end of header string winhttp.c:2540: Test failed: failed to query for raw headers: 12019 winhttp.c:2543: Test failed: returned string has too many NULL characters winhttp.c:2548: Test failed: failed to read data 12019 winhttp.c:2549: Test failed: count was wrong winhttp.c:2550: Test failed: http data wrong
=== w8adm (32 bit report) ===
winhttp: winhttp.c:301: Test failed: WinHttpSendRequest failed: 12007 winhttp.c:302: Test failed: got 12007 winhttp.c:407: Test failed: WinHttpSendRequest failed: 12007 winhttp.c:427: Test failed: Expected ERROR_INVALID_PARAMETER got 12019. winhttp.c:427: Test failed: Expected ERROR_INVALID_PARAMETER got 12019. winhttp.c:427: Test failed: Expected ERROR_INVALID_PARAMETER got 12019. winhttp.c:427: Test failed: Expected ERROR_INVALID_PARAMETER got 12019. winhttp.c:427: Test failed: Expected ERROR_INVALID_PARAMETER got 12019. winhttp.c:427: Test failed: Expected ERROR_INVALID_PARAMETER got 12019. winhttp.c:434: Test failed: Expected ERROR_SUCCESS got 12019. winhttp.c:436: Test failed: WinHttpReceiveResponse failed: 12019. winhttp.c:440: Test failed: got 12019 winhttp.c:448: Test failed: WinHttpReadData failed: 12019. winhttp.c:450: Test failed: Read 4294967295 bytes winhttp.c:451: Test failed: Data read did not match. winhttp.c:1048: Test failed: failed to send request 12007 winhttp.c:1051: Test failed: failed to receive response 12019 winhttp.c:1056: Test failed: header query failed 12019 winhttp.c:1057: Test failed: got 3735928559 winhttp.c:1105: Test failed: failed to send request 12007 winhttp.c:1109: Test failed: failed to retrieve certificate context 12019 winhttp.c:1114: Test failed: failed to retrieve key bitness 4317 winhttp.c:1118: Test failed: failed to retrieve certificate info 12019 winhttp.c:1138: Test failed: failed to receive response 12019 winhttp.c:1142: Test failed: failed to query available data 12019 winhttp.c:1143: Test failed: available_size = 0 winhttp.c:1148: Test failed: failed unexpectedly 12019 winhttp.c:1149: Test failed: request failed unexpectedly 3735928559 winhttp.c:1160: Test failed: WinHttpReadData failed: 12019. winhttp.c:1171: Test failed: failed to retrieve certificate context 12019 winhttp.c:5411: Test failed: failed to send request 12007 winhttp.c:5416: Test failed: got 12019