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
20d7bc95
Commit
20d7bc95
authored
Aug 22, 2011
by
André Hentschel
Committed by
Alexandre Julliard
Aug 24, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Parse user and password for proxy authentication.
parent
d8f036e4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
3 deletions
+40
-3
internet.c
dlls/wininet/internet.c
+40
-3
No files found.
dlls/wininet/internet.c
View file @
20d7bc95
...
...
@@ -621,9 +621,46 @@ static BOOL INTERNET_ConfigureProxy( appinfo_t *lpwai )
if
(
wpi
.
proxyEnabled
)
{
lpwai
->
accessType
=
INTERNET_OPEN_TYPE_PROXY
;
lpwai
->
proxy
=
wpi
.
proxy
;
return
TRUE
;
WCHAR
proxyurl
[
INTERNET_MAX_URL_LENGTH
];
WCHAR
username
[
INTERNET_MAX_USER_NAME_LENGTH
];
WCHAR
password
[
INTERNET_MAX_PASSWORD_LENGTH
];
WCHAR
hostname
[
INTERNET_MAX_HOST_NAME_LENGTH
];
URL_COMPONENTSW
UrlComponents
;
UrlComponents
.
dwStructSize
=
sizeof
UrlComponents
;
UrlComponents
.
dwSchemeLength
=
0
;
UrlComponents
.
lpszHostName
=
hostname
;
UrlComponents
.
dwHostNameLength
=
INTERNET_MAX_HOST_NAME_LENGTH
;
UrlComponents
.
lpszUserName
=
username
;
UrlComponents
.
dwUserNameLength
=
INTERNET_MAX_USER_NAME_LENGTH
;
UrlComponents
.
lpszPassword
=
password
;
UrlComponents
.
dwPasswordLength
=
INTERNET_MAX_PASSWORD_LENGTH
;
UrlComponents
.
dwExtraInfoLength
=
0
;
if
(
InternetCrackUrlW
(
wpi
.
proxy
,
0
,
0
,
&
UrlComponents
))
{
static
const
WCHAR
szFormat
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
':'
,
'/'
,
'/'
,
'%'
,
's'
,
':'
,
'%'
,
'u'
,
0
};
if
(
UrlComponents
.
nPort
==
INTERNET_INVALID_PORT_NUMBER
)
UrlComponents
.
nPort
=
INTERNET_DEFAULT_HTTP_PORT
;
sprintfW
(
proxyurl
,
szFormat
,
hostname
,
UrlComponents
.
nPort
);
lpwai
->
accessType
=
INTERNET_OPEN_TYPE_PROXY
;
lpwai
->
proxy
=
heap_strdupW
(
proxyurl
);
if
(
UrlComponents
.
dwUserNameLength
)
{
lpwai
->
proxyUsername
=
heap_strdupW
(
UrlComponents
.
lpszUserName
);
lpwai
->
proxyPassword
=
heap_strdupW
(
UrlComponents
.
lpszPassword
);
}
TRACE
(
"http proxy = %s
\n
"
,
debugstr_w
(
lpwai
->
proxy
));
return
TRUE
;
}
else
{
TRACE
(
"Failed to parse proxy: %s
\n
"
,
debugstr_w
(
wpi
.
proxy
));
lpwai
->
proxy
=
NULL
;
}
}
lpwai
->
accessType
=
INTERNET_OPEN_TYPE_DIRECT
;
...
...
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