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
7528f4d5
Commit
7528f4d5
authored
May 18, 2016
by
Jacek Caban
Committed by
Alexandre Julliard
May 19, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Use scheme id instead of string in HTTP_HandleRedirect.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
58e95f72
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
15 deletions
+3
-15
http.c
dlls/wininet/http.c
+3
-15
No files found.
dlls/wininet/http.c
View file @
7528f4d5
...
@@ -4130,36 +4130,24 @@ static DWORD HTTP_HandleRedirect(http_request_t *request, LPCWSTR lpszUrl)
...
@@ -4130,36 +4130,24 @@ static DWORD HTTP_HandleRedirect(http_request_t *request, LPCWSTR lpszUrl)
}
}
else
else
{
{
URL_COMPONENTSW
urlComponents
;
URL_COMPONENTSW
urlComponents
=
{
sizeof
(
urlComponents
)
};
WCHAR
protocol
[
INTERNET_MAX_SCHEME_LENGTH
];
WCHAR
hostName
[
INTERNET_MAX_HOST_NAME_LENGTH
];
WCHAR
hostName
[
INTERNET_MAX_HOST_NAME_LENGTH
];
WCHAR
userName
[
INTERNET_MAX_USER_NAME_LENGTH
];
WCHAR
userName
[
INTERNET_MAX_USER_NAME_LENGTH
];
BOOL
custom_port
=
FALSE
;
BOOL
custom_port
=
FALSE
;
static
const
WCHAR
httpW
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
0
};
static
const
WCHAR
httpsW
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
's'
,
0
};
userName
[
0
]
=
0
;
userName
[
0
]
=
0
;
hostName
[
0
]
=
0
;
hostName
[
0
]
=
0
;
protocol
[
0
]
=
0
;
urlComponents
.
dwStructSize
=
sizeof
(
URL_COMPONENTSW
);
urlComponents
.
lpszScheme
=
protocol
;
urlComponents
.
dwSchemeLength
=
INTERNET_MAX_SCHEME_LENGTH
;
urlComponents
.
lpszHostName
=
hostName
;
urlComponents
.
lpszHostName
=
hostName
;
urlComponents
.
dwHostNameLength
=
INTERNET_MAX_HOST_NAME_LENGTH
;
urlComponents
.
dwHostNameLength
=
INTERNET_MAX_HOST_NAME_LENGTH
;
urlComponents
.
lpszUserName
=
userName
;
urlComponents
.
lpszUserName
=
userName
;
urlComponents
.
dwUserNameLength
=
INTERNET_MAX_USER_NAME_LENGTH
;
urlComponents
.
dwUserNameLength
=
INTERNET_MAX_USER_NAME_LENGTH
;
urlComponents
.
lpszPassword
=
NULL
;
urlComponents
.
dwPasswordLength
=
0
;
urlComponents
.
lpszUrlPath
=
path
;
urlComponents
.
lpszUrlPath
=
path
;
urlComponents
.
dwUrlPathLength
=
INTERNET_MAX_PATH_LENGTH
;
urlComponents
.
dwUrlPathLength
=
INTERNET_MAX_PATH_LENGTH
;
urlComponents
.
lpszExtraInfo
=
NULL
;
urlComponents
.
dwExtraInfoLength
=
0
;
if
(
!
InternetCrackUrlW
(
lpszUrl
,
strlenW
(
lpszUrl
),
0
,
&
urlComponents
))
if
(
!
InternetCrackUrlW
(
lpszUrl
,
strlenW
(
lpszUrl
),
0
,
&
urlComponents
))
return
INTERNET_GetLastError
();
return
INTERNET_GetLastError
();
if
(
!
strcmpiW
(
protocol
,
httpW
)
)
{
if
(
urlComponents
.
nScheme
==
INTERNET_SCHEME_HTTP
)
{
if
(
request
->
hdr
.
dwFlags
&
INTERNET_FLAG_SECURE
)
{
if
(
request
->
hdr
.
dwFlags
&
INTERNET_FLAG_SECURE
)
{
TRACE
(
"redirect from secure page to non-secure page
\n
"
);
TRACE
(
"redirect from secure page to non-secure page
\n
"
);
/* FIXME: warn about from secure redirect to non-secure page */
/* FIXME: warn about from secure redirect to non-secure page */
...
@@ -4167,7 +4155,7 @@ static DWORD HTTP_HandleRedirect(http_request_t *request, LPCWSTR lpszUrl)
...
@@ -4167,7 +4155,7 @@ static DWORD HTTP_HandleRedirect(http_request_t *request, LPCWSTR lpszUrl)
}
}
custom_port
=
urlComponents
.
nPort
!=
INTERNET_DEFAULT_HTTP_PORT
;
custom_port
=
urlComponents
.
nPort
!=
INTERNET_DEFAULT_HTTP_PORT
;
}
else
if
(
!
strcmpiW
(
protocol
,
httpsW
)
)
{
}
else
if
(
urlComponents
.
nScheme
==
INTERNET_SCHEME_HTTPS
)
{
if
(
!
(
request
->
hdr
.
dwFlags
&
INTERNET_FLAG_SECURE
))
{
if
(
!
(
request
->
hdr
.
dwFlags
&
INTERNET_FLAG_SECURE
))
{
TRACE
(
"redirect from non-secure page to secure page
\n
"
);
TRACE
(
"redirect from non-secure page to secure page
\n
"
);
/* FIXME: notify about redirect to secure page */
/* FIXME: notify about redirect to secure page */
...
...
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