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
68fdc5cb
Commit
68fdc5cb
authored
Jul 21, 2009
by
Juan Lang
Committed by
Alexandre Julliard
Jul 22, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: Strip scheme from http_proxy environment variable.
parent
2b460a6c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
11 deletions
+36
-11
session.c
dlls/winhttp/session.c
+36
-11
No files found.
dlls/winhttp/session.c
View file @
68fdc5cb
...
...
@@ -929,19 +929,44 @@ BOOL WINAPI WinHttpGetDefaultProxyConfiguration( WINHTTP_PROXY_INFO *info )
}
else
if
((
envproxy
=
getenv
(
"http_proxy"
)))
{
WCHAR
*
envproxyW
;
int
len
;
char
*
colon
,
*
http_proxy
;
len
=
MultiByteToWideChar
(
CP_UNIXCP
,
0
,
envproxy
,
-
1
,
NULL
,
0
);
if
((
envproxyW
=
GlobalAlloc
(
0
,
len
*
sizeof
(
WCHAR
))))
if
((
colon
=
strchr
(
envproxy
,
':'
)))
{
MultiByteToWideChar
(
CP_UNIXCP
,
0
,
envproxy
,
-
1
,
envproxyW
,
len
);
direct
=
FALSE
;
info
->
dwAccessType
=
WINHTTP_ACCESS_TYPE_NAMED_PROXY
;
info
->
lpszProxy
=
envproxyW
;
info
->
lpszProxyBypass
=
NULL
;
TRACE
(
"http proxy (from environment) = %s
\n
"
,
debugstr_w
(
info
->
lpszProxy
));
if
(
*
(
colon
+
1
)
==
'/'
&&
*
(
colon
+
2
)
==
'/'
)
{
static
const
char
http
[]
=
"http://"
;
/* It's a scheme, check that it's http */
if
(
!
strncmp
(
envproxy
,
http
,
strlen
(
http
)
))
http_proxy
=
envproxy
+
strlen
(
http
);
else
{
WARN
(
"unsupported scheme in $http_proxy: %s
\n
"
,
envproxy
);
http_proxy
=
NULL
;
}
}
else
http_proxy
=
envproxy
;
}
else
http_proxy
=
envproxy
;
if
(
http_proxy
)
{
WCHAR
*
http_proxyW
;
int
len
;
len
=
MultiByteToWideChar
(
CP_UNIXCP
,
0
,
http_proxy
,
-
1
,
NULL
,
0
);
if
((
http_proxyW
=
GlobalAlloc
(
0
,
len
*
sizeof
(
WCHAR
))))
{
MultiByteToWideChar
(
CP_UNIXCP
,
0
,
http_proxy
,
-
1
,
http_proxyW
,
len
);
direct
=
FALSE
;
info
->
dwAccessType
=
WINHTTP_ACCESS_TYPE_NAMED_PROXY
;
info
->
lpszProxy
=
http_proxyW
;
info
->
lpszProxyBypass
=
NULL
;
TRACE
(
"http proxy (from environment) = %s
\n
"
,
debugstr_w
(
info
->
lpszProxy
));
}
}
}
if
(
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