winhttp: Use proxy server when redirecting.
This commit is contained in:
parent
de12987d7f
commit
31545206fb
|
@ -1158,13 +1158,12 @@ static BOOL handle_redirect( request_t *request )
|
||||||
hostname[len] = 0;
|
hostname[len] = 0;
|
||||||
|
|
||||||
port = uc.nPort ? uc.nPort : (uc.nScheme == INTERNET_SCHEME_HTTPS ? 443 : 80);
|
port = uc.nPort ? uc.nPort : (uc.nScheme == INTERNET_SCHEME_HTTPS ? 443 : 80);
|
||||||
if (strcmpiW( connect->servername, hostname ) || connect->serverport != port)
|
if (strcmpiW( connect->hostname, hostname ) || connect->serverport != port)
|
||||||
{
|
{
|
||||||
heap_free( connect->hostname );
|
heap_free( connect->hostname );
|
||||||
connect->hostname = hostname;
|
connect->hostname = hostname;
|
||||||
heap_free( connect->servername );
|
connect->hostport = port;
|
||||||
connect->servername = strdupW( connect->hostname );
|
if (!(ret = set_server_for_hostname( connect, hostname, port ))) goto end;
|
||||||
connect->serverport = connect->hostport = port;
|
|
||||||
|
|
||||||
netconn_close( &request->netconn );
|
netconn_close( &request->netconn );
|
||||||
if (!(ret = netconn_init( &request->netconn, request->hdr.flags & WINHTTP_FLAG_SECURE ))) goto end;
|
if (!(ret = netconn_init( &request->netconn, request->hdr.flags & WINHTTP_FLAG_SECURE ))) goto end;
|
||||||
|
|
|
@ -316,7 +316,6 @@ static BOOL should_bypass_proxy(session_t *session, LPCWSTR server)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
|
||||||
BOOL set_server_for_hostname( connect_t *connect, LPCWSTR server, INTERNET_PORT port )
|
BOOL set_server_for_hostname( connect_t *connect, LPCWSTR server, INTERNET_PORT port )
|
||||||
{
|
{
|
||||||
session_t *session = connect->session;
|
session_t *session = connect->session;
|
||||||
|
|
|
@ -221,6 +221,7 @@ BOOL set_cookies( request_t *, const WCHAR * );
|
||||||
BOOL add_cookie_headers( request_t * );
|
BOOL add_cookie_headers( request_t * );
|
||||||
BOOL add_request_headers( request_t *, LPCWSTR, DWORD, DWORD );
|
BOOL add_request_headers( request_t *, LPCWSTR, DWORD, DWORD );
|
||||||
void delete_domain( domain_t * );
|
void delete_domain( domain_t * );
|
||||||
|
BOOL set_server_for_hostname( connect_t *connect, LPCWSTR server, INTERNET_PORT port );
|
||||||
|
|
||||||
static inline void *heap_alloc( SIZE_T size )
|
static inline void *heap_alloc( SIZE_T size )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue