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
cdf25ee4
Commit
cdf25ee4
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: Store an info if connection is HTTPS in server_t.
parent
d1607dbb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
7 deletions
+9
-7
http.c
dlls/wininet/http.c
+6
-5
internet.c
dlls/wininet/internet.c
+1
-1
internet.h
dlls/wininet/internet.h
+2
-1
No files found.
dlls/wininet/http.c
View file @
cdf25ee4
...
...
@@ -251,14 +251,14 @@ void server_release(server_t *server)
heap_free
(
server
);
}
server_t
*
get_server
(
const
WCHAR
*
name
,
INTERNET_PORT
port
,
BOOL
do_create
)
server_t
*
get_server
(
const
WCHAR
*
name
,
INTERNET_PORT
port
,
BOOL
is_https
,
BOOL
do_create
)
{
server_t
*
iter
,
*
server
=
NULL
;
EnterCriticalSection
(
&
connection_pool_cs
);
LIST_FOR_EACH_ENTRY
(
iter
,
&
connection_pool
,
server_t
,
entry
)
{
if
(
iter
->
port
==
port
&&
!
strcmpW
(
iter
->
name
,
name
))
{
if
(
iter
->
port
==
port
&&
!
strcmpW
(
iter
->
name
,
name
)
&&
iter
->
is_https
==
is_https
)
{
server
=
iter
;
server_addref
(
server
);
break
;
...
...
@@ -270,6 +270,7 @@ server_t *get_server(const WCHAR *name, INTERNET_PORT port, BOOL do_create)
if
(
server
)
{
server
->
ref
=
2
;
/* list reference and return */
server
->
port
=
port
;
server
->
is_https
=
is_https
;
list_init
(
&
server
->
conn_pool
);
server
->
name
=
heap_strdupW
(
name
);
if
(
server
->
name
)
{
...
...
@@ -1725,7 +1726,7 @@ static BOOL HTTP_DealWithProxy(appinfo_t *hIC, http_session_t *session, http_req
if
(
UrlComponents
.
nPort
==
INTERNET_INVALID_PORT_NUMBER
)
UrlComponents
.
nPort
=
INTERNET_DEFAULT_HTTP_PORT
;
new_server
=
get_server
(
UrlComponents
.
lpszHostName
,
UrlComponents
.
nPort
,
TRUE
);
new_server
=
get_server
(
UrlComponents
.
lpszHostName
,
UrlComponents
.
nPort
,
UrlComponents
.
nScheme
==
INTERNET_SCHEME_HTTPS
,
TRUE
);
if
(
!
new_server
)
return
FALSE
;
...
...
@@ -3194,7 +3195,7 @@ static DWORD HTTP_HttpOpenRequestW(http_session_t *session,
if
(
port
==
INTERNET_INVALID_PORT_NUMBER
)
port
=
dwFlags
&
INTERNET_FLAG_SECURE
?
INTERNET_DEFAULT_HTTPS_PORT
:
INTERNET_DEFAULT_HTTP_PORT
;
request
->
server
=
get_server
(
session
->
hostName
,
port
,
TRUE
);
request
->
server
=
get_server
(
session
->
hostName
,
port
,
(
dwFlags
&
INTERNET_FLAG_SECURE
)
!=
0
,
TRUE
);
if
(
!
request
->
server
)
{
WININET_Release
(
&
request
->
hdr
);
return
ERROR_OUTOFMEMORY
;
...
...
@@ -4022,7 +4023,7 @@ static DWORD HTTP_HandleRedirect(http_request_t *request, LPCWSTR lpszUrl)
if
(
strcmpiW
(
request
->
server
->
name
,
hostName
)
||
request
->
server
->
port
!=
urlComponents
.
nPort
)
{
server_t
*
new_server
;
new_server
=
get_server
(
hostName
,
urlComponents
.
nPort
,
TRUE
);
new_server
=
get_server
(
hostName
,
urlComponents
.
nPort
,
urlComponents
.
nScheme
==
INTERNET_SCHEME_HTTPS
,
TRUE
);
server_release
(
request
->
server
);
request
->
server
=
new_server
;
}
...
...
dlls/wininet/internet.c
View file @
cdf25ee4
...
...
@@ -4431,7 +4431,7 @@ BOOL WINAPI InternetGetSecurityInfoByURLW(LPCWSTR lpszURL, PCCERT_CHAIN_CONTEXT
if
(
url
.
nPort
==
INTERNET_INVALID_PORT_NUMBER
)
url
.
nPort
=
INTERNET_DEFAULT_HTTPS_PORT
;
server
=
get_server
(
hostname
,
url
.
nPort
,
FALSE
);
server
=
get_server
(
hostname
,
url
.
nPort
,
TRUE
,
FALSE
);
if
(
!
server
)
{
SetLastError
(
ERROR_INTERNET_ITEM_NOT_FOUND
);
return
FALSE
;
...
...
dlls/wininet/internet.h
View file @
cdf25ee4
...
...
@@ -58,6 +58,7 @@ extern HMODULE WININET_hModule DECLSPEC_HIDDEN;
typedef
struct
{
WCHAR
*
name
;
INTERNET_PORT
port
;
BOOL
is_https
;
struct
sockaddr_storage
addr
;
socklen_t
addr_len
;
char
addr_str
[
INET6_ADDRSTRLEN
];
...
...
@@ -550,7 +551,7 @@ int NETCON_GetCipherStrength(netconn_t*) DECLSPEC_HIDDEN;
DWORD
NETCON_set_timeout
(
netconn_t
*
connection
,
BOOL
send
,
DWORD
value
)
DECLSPEC_HIDDEN
;
int
sock_get_error
(
int
)
DECLSPEC_HIDDEN
;
server_t
*
get_server
(
const
WCHAR
*
,
INTERNET_PORT
,
BOOL
);
server_t
*
get_server
(
const
WCHAR
*
,
INTERNET_PORT
,
BOOL
,
BOOL
);
BOOL
init_urlcache
(
void
)
DECLSPEC_HIDDEN
;
void
free_urlcache
(
void
)
DECLSPEC_HIDDEN
;
...
...
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