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
d8f036e4
Commit
d8f036e4
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: Don't return a relative path when building the proxy url request.
parent
0fda135f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
16 deletions
+21
-16
http.c
dlls/wininet/http.c
+21
-16
No files found.
dlls/wininet/http.c
View file @
d8f036e4
...
...
@@ -1648,34 +1648,39 @@ static BOOL HTTP_InsertAuthorization( http_request_t *request, struct HttpAuthIn
static
WCHAR
*
HTTP_BuildProxyRequestUrl
(
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
);
ZeroMemory
(
&
UrlComponents
,
sizeof
(
URL_COMPONENTSW
));
if
(
InternetCrackUrlW
(
url
,
0
,
0
,
&
UrlComponents
))
goto
done
;
heap_free
(
url
);
}
else
{
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
;
size
=
16
;
/* "https://" + sizeof(port#) + ":/\0" */
size
+=
strlenW
(
session
->
hostName
)
+
strlenW
(
req
->
path
);
size
=
16
;
/* "https://" + sizeof(port#) + ":/\0" */
size
+=
strlenW
(
session
->
hostName
)
+
strlenW
(
req
->
path
);
if
(
!
(
url
=
heap_alloc
(
size
*
sizeof
(
WCHAR
))))
return
NULL
;
if
(
!
(
url
=
heap_alloc
(
size
*
sizeof
(
WCHAR
))))
return
NULL
;
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
);
}
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
;
}
...
...
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