Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
8ca3e80d
Commit
8ca3e80d
authored
Nov 01, 2012
by
Hans Leidekker
Committed by
Alexandre Julliard
Nov 01, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: Fix the error returned from WinHttpGetProxyForUrl when autodetection fails.
parent
218b1951
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
4 deletions
+24
-4
session.c
dlls/winhttp/session.c
+1
-3
winhttp.c
dlls/winhttp/tests/winhttp.c
+23
-1
No files found.
dlls/winhttp/session.c
View file @
8ca3e80d
...
...
@@ -2024,10 +2024,8 @@ BOOL WINAPI WinHttpGetProxyForUrl( HINTERNET hsession, LPCWSTR url, WINHTTP_AUTO
}
if
(
options
->
dwFlags
&
WINHTTP_AUTOPROXY_AUTO_DETECT
&&
!
WinHttpDetectAutoProxyConfigUrl
(
options
->
dwAutoDetectFlags
,
&
detected_pac_url
))
{
set_last_error
(
ERROR_WINHTTP_AUTO_PROXY_SERVICE_ERROR
);
goto
done
;
}
if
(
options
->
dwFlags
&
WINHTTP_AUTOPROXY_CONFIG_URL
)
pac_url
=
options
->
lpszAutoConfigUrl
;
else
pac_url
=
detected_pac_url
;
...
...
dlls/winhttp/tests/winhttp.c
View file @
8ca3e80d
...
...
@@ -2620,6 +2620,7 @@ static void test_WinHttpGetIEProxyConfigForCurrentUser(void)
static
void
test_WinHttpGetProxyForUrl
(
void
)
{
static
const
WCHAR
urlW
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
':'
,
'/'
,
'/'
,
'w'
,
'i'
,
'n'
,
'e'
,
'h'
,
'q'
,
'.'
,
'o'
,
'r'
,
'g'
,
0
};
static
const
WCHAR
wpadW
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
':'
,
'/'
,
'/'
,
'w'
,
'p'
,
'a'
,
'd'
,
'/'
,
'w'
,
'p'
,
'a'
,
'd'
,
'.'
,
'd'
,
'a'
,
't'
,
0
};
static
const
WCHAR
emptyW
[]
=
{
0
};
BOOL
ret
;
DWORD
error
;
...
...
@@ -2693,8 +2694,29 @@ static void test_WinHttpGetProxyForUrl(void)
options
.
dwAutoDetectFlags
=
WINHTTP_AUTO_DETECT_TYPE_DNS_A
;
memset
(
&
info
,
0
,
sizeof
(
info
)
);
SetLastError
(
0xdeadbeef
);
ret
=
WinHttpGetProxyForUrl
(
session
,
urlW
,
&
options
,
&
info
);
if
(
ret
)
error
=
GetLastError
();
if
(
!
ret
)
ok
(
error
==
ERROR_WINHTTP_AUTODETECTION_FAILED
,
"got %u
\n
"
,
error
);
else
{
trace
(
"%u
\n
"
,
info
.
dwAccessType
);
trace
(
"%s
\n
"
,
wine_dbgstr_w
(
info
.
lpszProxy
));
trace
(
"%s
\n
"
,
wine_dbgstr_w
(
info
.
lpszProxyBypass
));
GlobalFree
(
info
.
lpszProxy
);
GlobalFree
(
info
.
lpszProxyBypass
);
}
options
.
dwFlags
=
WINHTTP_AUTOPROXY_CONFIG_URL
;
options
.
dwAutoDetectFlags
=
0
;
options
.
lpszAutoConfigUrl
=
wpadW
;
memset
(
&
info
,
0
,
sizeof
(
info
)
);
SetLastError
(
0xdeadbeef
);
ret
=
WinHttpGetProxyForUrl
(
session
,
urlW
,
&
options
,
&
info
);
error
=
GetLastError
();
if
(
!
ret
)
ok
(
error
==
ERROR_WINHTTP_UNABLE_TO_DOWNLOAD_SCRIPT
,
"got %u
\n
"
,
error
);
else
{
trace
(
"%u
\n
"
,
info
.
dwAccessType
);
trace
(
"%s
\n
"
,
wine_dbgstr_w
(
info
.
lpszProxy
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment