Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
f37b94e6
Commit
f37b94e6
authored
Jan 20, 2012
by
Hans Leidekker
Committed by
Alexandre Julliard
Jan 20, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: Download PAC scripts in a separate session.
parent
7c319885
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
session.c
dlls/winhttp/session.c
+5
-3
No files found.
dlls/winhttp/session.c
View file @
f37b94e6
...
...
@@ -1905,11 +1905,11 @@ done:
return
ret
;
}
static
BSTR
download_script
(
HINTERNET
ses
,
const
WCHAR
*
url
)
static
BSTR
download_script
(
const
WCHAR
*
url
)
{
static
const
WCHAR
typeW
[]
=
{
'*'
,
'/'
,
'*'
,
0
};
static
const
WCHAR
*
acceptW
[]
=
{
typeW
,
NULL
};
HINTERNET
con
,
req
=
NULL
;
HINTERNET
ses
,
con
=
NULL
,
req
=
NULL
;
WCHAR
*
hostname
;
URL_COMPONENTSW
uc
;
DWORD
size
=
4096
,
offset
,
to_read
,
bytes_read
,
flags
=
0
;
...
...
@@ -1924,6 +1924,7 @@ static BSTR download_script( HINTERNET ses, const WCHAR *url )
memcpy
(
hostname
,
uc
.
lpszHostName
,
uc
.
dwHostNameLength
*
sizeof
(
WCHAR
)
);
hostname
[
uc
.
dwHostNameLength
]
=
0
;
if
(
!
(
ses
=
WinHttpOpen
(
NULL
,
WINHTTP_ACCESS_TYPE_NO_PROXY
,
NULL
,
NULL
,
0
)))
goto
done
;
if
(
!
(
con
=
WinHttpConnect
(
ses
,
hostname
,
uc
.
nPort
,
0
)))
goto
done
;
if
(
uc
.
nScheme
==
INTERNET_SCHEME_HTTPS
)
flags
|=
WINHTTP_FLAG_SECURE
;
if
(
!
(
req
=
WinHttpOpenRequest
(
con
,
NULL
,
uc
.
lpszUrlPath
,
NULL
,
NULL
,
acceptW
,
flags
)))
goto
done
;
...
...
@@ -1955,6 +1956,7 @@ static BSTR download_script( HINTERNET ses, const WCHAR *url )
done:
WinHttpCloseHandle
(
req
);
WinHttpCloseHandle
(
con
);
WinHttpCloseHandle
(
ses
);
heap_free
(
buffer
);
heap_free
(
hostname
);
if
(
!
script
)
set_last_error
(
ERROR_WINHTTP_UNABLE_TO_DOWNLOAD_SCRIPT
);
...
...
@@ -2005,7 +2007,7 @@ BOOL WINAPI WinHttpGetProxyForUrl( HINTERNET hsession, LPCWSTR url, WINHTTP_AUTO
if
(
options
->
dwFlags
&
WINHTTP_AUTOPROXY_CONFIG_URL
)
pac_url
=
options
->
lpszAutoConfigUrl
;
else
pac_url
=
detected_pac_url
;
if
(
!
(
script
=
download_script
(
hsession
,
pac_url
)))
goto
done
;
if
(
!
(
script
=
download_script
(
pac_url
)))
goto
done
;
ret
=
run_script
(
script
,
url
,
info
);
SysFreeString
(
script
);
...
...
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