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
5fb49243
Commit
5fb49243
authored
Nov 19, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 19, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Use processed string from server_t for constructing proxy path.
parent
3cf2838a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
31 deletions
+15
-31
http.c
dlls/wininet/http.c
+15
-31
No files found.
dlls/wininet/http.c
View file @
5fb49243
...
...
@@ -1679,41 +1679,25 @@ static BOOL HTTP_InsertAuthorization( http_request_t *request, struct HttpAuthIn
return
TRUE
;
}
static
WCHAR
*
HTTP_BuildProxyRequestU
rl
(
http_request_t
*
req
)
static
WCHAR
*
build_proxy_path_u
rl
(
http_request_t
*
req
)
{
static
const
WCHAR
slash
[]
=
{
'/'
,
0
};
static
const
WCHAR
format
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
':'
,
'/'
,
'/'
,
'%'
,
's'
,
':'
,
'%'
,
'u'
,
0
};
static
const
WCHAR
formatSSL
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
's'
,
':'
,
'/'
,
'/'
,
'%'
,
's'
,
':'
,
'%'
,
'u'
,
0
};
http_session_t
*
session
=
req
->
session
;
WCHAR
new_location
[
INTERNET_MAX_URL_LENGTH
],
*
url
;
DWORD
size
;
size
=
sizeof
(
new_location
);
if
(
HTTP_HttpQueryInfoW
(
req
,
HTTP_QUERY_LOCATION
,
new_location
,
&
size
,
NULL
)
==
ERROR_SUCCESS
)
{
URL_COMPONENTSW
UrlComponents
;
if
(
!
(
url
=
heap_alloc
(
size
+
sizeof
(
WCHAR
))))
return
NULL
;
strcpyW
(
url
,
new_location
);
DWORD
size
,
len
;
WCHAR
*
url
;
ZeroMemory
(
&
UrlComponents
,
sizeof
(
URL_COMPONENTSW
));
if
(
InternetCrackUrlW
(
url
,
0
,
0
,
&
UrlComponents
))
goto
done
;
heap_free
(
url
);
}
len
=
strlenW
(
req
->
server
->
scheme_host_port
);
size
=
len
+
strlenW
(
req
->
path
)
+
1
;
if
(
*
req
->
path
!=
'/'
)
size
++
;
url
=
heap_alloc
(
size
*
sizeof
(
WCHAR
));
if
(
!
url
)
return
NULL
;
size
=
16
;
/* "https://" + sizeof(port#) + ":/\0" */
size
+=
strlenW
(
session
->
hostName
)
+
strlenW
(
req
->
path
);
memcpy
(
url
,
req
->
server
->
scheme_host_port
,
len
*
sizeof
(
WCHAR
));
if
(
*
req
->
path
!=
'/'
)
url
[
len
++
]
=
'/'
;
if
(
!
(
url
=
heap_alloc
(
size
*
sizeof
(
WCHAR
))))
return
NULL
;
strcpyW
(
url
+
len
,
req
->
path
)
;
if
(
req
->
hdr
.
dwFlags
&
INTERNET_FLAG_SECURE
)
sprintfW
(
url
,
formatSSL
,
session
->
hostName
,
session
->
hostPort
);
else
sprintfW
(
url
,
format
,
session
->
hostName
,
session
->
hostPort
);
if
(
req
->
path
[
0
]
!=
'/'
)
strcatW
(
url
,
slash
);
strcatW
(
url
,
req
->
path
);
done:
TRACE
(
"url=%s
\n
"
,
debugstr_w
(
url
));
return
url
;
}
...
...
@@ -4856,7 +4840,7 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *request, LPCWSTR lpszHeaders,
if
(
request
->
session
->
appInfo
->
proxy
&&
request
->
session
->
appInfo
->
proxy
[
0
])
{
WCHAR
*
url
=
HTTP_BuildProxyRequestU
rl
(
request
);
WCHAR
*
url
=
build_proxy_path_u
rl
(
request
);
requestString
=
HTTP_BuildHeaderRequestString
(
request
,
request
->
verb
,
url
,
request
->
version
);
heap_free
(
url
);
}
...
...
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