wininet: Use proxy settings directly from http_request_t in a few more places.

This commit is contained in:
Jacek Caban 2012-11-19 11:48:08 +01:00 committed by Alexandre Julliard
parent 5fb49243af
commit 3e23b5e589
1 changed files with 4 additions and 5 deletions

View File

@ -1950,7 +1950,6 @@ static DWORD HTTPREQ_QueryOption(object_header_t *hdr, DWORD option, void *buffe
switch(option) { switch(option) {
case INTERNET_OPTION_DIAGNOSTIC_SOCKET_INFO: case INTERNET_OPTION_DIAGNOSTIC_SOCKET_INFO:
{ {
http_session_t *session = req->session;
INTERNET_DIAGNOSTIC_SOCKET_INFO *info = buffer; INTERNET_DIAGNOSTIC_SOCKET_INFO *info = buffer;
FIXME("INTERNET_DIAGNOSTIC_SOCKET_INFO stub\n"); FIXME("INTERNET_DIAGNOSTIC_SOCKET_INFO stub\n");
@ -1964,11 +1963,11 @@ static DWORD HTTPREQ_QueryOption(object_header_t *hdr, DWORD option, void *buffe
info->Socket = 0; info->Socket = 0;
/* FIXME: get source port from req->netConnection */ /* FIXME: get source port from req->netConnection */
info->SourcePort = 0; info->SourcePort = 0;
info->DestPort = session->hostPort; info->DestPort = req->server->port;
info->Flags = 0; info->Flags = 0;
if (HTTP_KeepAlive(req)) if (HTTP_KeepAlive(req))
info->Flags |= IDSI_FLAG_KEEP_ALIVE; info->Flags |= IDSI_FLAG_KEEP_ALIVE;
if (session->appInfo->proxy && session->appInfo->proxy[0] != 0) if (req->proxy)
info->Flags |= IDSI_FLAG_PROXY; info->Flags |= IDSI_FLAG_PROXY;
if (req->netconn->useSSL) if (req->netconn->useSSL)
info->Flags |= IDSI_FLAG_SECURE; info->Flags |= IDSI_FLAG_SECURE;
@ -2159,7 +2158,7 @@ static DWORD HTTPREQ_QueryOption(object_header_t *hdr, DWORD option, void *buffe
* INTERNET_REQFLAG_CACHE_WRITE_DISABLED * INTERNET_REQFLAG_CACHE_WRITE_DISABLED
*/ */
if(req->session->appInfo->proxy) if(req->proxy)
flags |= INTERNET_REQFLAG_VIA_PROXY; flags |= INTERNET_REQFLAG_VIA_PROXY;
if(!req->rawHeaders) if(!req->rawHeaders)
flags |= INTERNET_REQFLAG_NO_HEADERS; flags |= INTERNET_REQFLAG_NO_HEADERS;
@ -4838,7 +4837,7 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *request, LPCWSTR lpszHeaders,
if (!(request->hdr.dwFlags & INTERNET_FLAG_NO_COOKIES)) if (!(request->hdr.dwFlags & INTERNET_FLAG_NO_COOKIES))
HTTP_InsertCookies(request); HTTP_InsertCookies(request);
if (request->session->appInfo->proxy && request->session->appInfo->proxy[0]) if (request->proxy)
{ {
WCHAR *url = build_proxy_path_url(request); WCHAR *url = build_proxy_path_url(request);
requestString = HTTP_BuildHeaderRequestString(request, request->verb, url, request->version); requestString = HTTP_BuildHeaderRequestString(request, request->verb, url, request->version);