diff --git a/dlls/wininet/dialogs.c b/dlls/wininet/dialogs.c index c74f9f9117e..6573cec1818 100644 --- a/dlls/wininet/dialogs.c +++ b/dlls/wininet/dialogs.c @@ -82,7 +82,7 @@ static BOOL WININET_GetProxyServer( HINTERNET hRequest, LPWSTR szBuf, DWORD sz ) if (NULL == hIC) goto done; - lstrcpynW(szBuf, hIC->lpszProxy, sz); + lstrcpynW(szBuf, hIC->proxy, sz); /* FIXME: perhaps it would be better to use InternetCrackUrl here */ p = strchrW(szBuf, ':'); @@ -272,11 +272,11 @@ static BOOL WININET_SetAuthorization( HINTERNET hRequest, LPWSTR username, { appinfo_t *hIC = session->lpAppInfo; - HeapFree(GetProcessHeap(), 0, hIC->lpszProxyUsername); - hIC->lpszProxyUsername = p; + HeapFree(GetProcessHeap(), 0, hIC->proxyUsername); + hIC->proxyUsername = p; - HeapFree(GetProcessHeap(), 0, hIC->lpszProxyPassword); - hIC->lpszProxyPassword = q; + HeapFree(GetProcessHeap(), 0, hIC->proxyPassword); + hIC->proxyPassword = q; } else { diff --git a/dlls/wininet/ftp.c b/dlls/wininet/ftp.c index e57f356cda1..e0e0cde25f3 100644 --- a/dlls/wininet/ftp.c +++ b/dlls/wininet/ftp.c @@ -2478,10 +2478,10 @@ HINTERNET FTP_Connect(appinfo_t *hIC, LPCWSTR lpszServerName, lpwfs->lpAppInfo = hIC; list_add_head( &hIC->hdr.children, &lpwfs->hdr.entry ); - if(hIC->lpszProxy && hIC->dwAccessType == INTERNET_OPEN_TYPE_PROXY) { - if(strchrW(hIC->lpszProxy, ' ')) + if(hIC->proxy && hIC->accessType == INTERNET_OPEN_TYPE_PROXY) { + if(strchrW(hIC->proxy, ' ')) FIXME("Several proxies not implemented.\n"); - if(hIC->lpszProxyBypass) + if(hIC->proxyBypass) FIXME("Proxy bypass is ignored.\n"); } if (!lpszUserName || !strlenW(lpszUserName)) { diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index 61e6cedbc7d..7069c142afb 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -1464,7 +1464,7 @@ static BOOL HTTP_DealWithProxy(appinfo_t *hIC, http_session_t *session, http_req UrlComponents.lpszHostName = buf; UrlComponents.dwHostNameLength = MAXHOSTNAME; - if (!INTERNET_FindProxyForProtocol(hIC->lpszProxy, protoHttp, protoProxy, &protoProxyLen)) + if (!INTERNET_FindProxyForProtocol(hIC->proxy, protoHttp, protoProxy, &protoProxyLen)) return FALSE; if( CSTR_EQUAL != CompareStringW(LOCALE_SYSTEM_DEFAULT, NORM_IGNORECASE, protoProxy,strlenW(szHttp),szHttp,strlenW(szHttp)) ) @@ -1671,7 +1671,7 @@ static DWORD HTTPREQ_QueryOption(object_header_t *hdr, DWORD option, void *buffe info->Flags = 0; if (HTTP_KeepAlive(req)) info->Flags |= IDSI_FLAG_KEEP_ALIVE; - if (session->lpAppInfo->lpszProxy && session->lpAppInfo->lpszProxy[0] != 0) + if (session->lpAppInfo->proxy && session->lpAppInfo->proxy[0] != 0) info->Flags |= IDSI_FLAG_PROXY; if (req->netConnection.useSSL) info->Flags |= IDSI_FLAG_SECURE; @@ -2662,7 +2662,7 @@ static DWORD HTTP_HttpOpenRequestW(http_session_t *session, INTERNET_DEFAULT_HTTPS_PORT : INTERNET_DEFAULT_HTTP_PORT); - if (NULL != hIC->lpszProxy && hIC->lpszProxy[0] != 0) + if (NULL != hIC->proxy && hIC->proxy[0] != 0) HTTP_DealWithProxy( hIC, session, request ); INTERNET_SendCallback(&session->hdr, dwContext, @@ -3318,7 +3318,7 @@ static DWORD HTTP_HandleRedirect(http_request_t *request, LPCWSTR lpszUrl) { http_session_t *session = request->lpHttpSession; appinfo_t *hIC = session->lpAppInfo; - BOOL using_proxy = hIC->lpszProxy && hIC->lpszProxy[0]; + BOOL using_proxy = hIC->proxy && hIC->proxy[0]; WCHAR path[INTERNET_MAX_URL_LENGTH]; int index; @@ -3607,15 +3607,15 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *request, LPCWSTR lpszHeaders, HTTP_HttpAddRequestHeadersW(request, contentLengthStr, -1L, HTTP_ADDREQ_FLAG_REPLACE); request->dwBytesToWrite = dwContentLength; } - if (request->lpHttpSession->lpAppInfo->lpszAgent) + if (request->lpHttpSession->lpAppInfo->agent) { WCHAR *agent_header; static const WCHAR user_agent[] = {'U','s','e','r','-','A','g','e','n','t',':',' ','%','s','\r','\n',0}; int len; - len = strlenW(request->lpHttpSession->lpAppInfo->lpszAgent) + strlenW(user_agent); + len = strlenW(request->lpHttpSession->lpAppInfo->agent) + strlenW(user_agent); agent_header = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); - sprintfW(agent_header, user_agent, request->lpHttpSession->lpAppInfo->lpszAgent); + sprintfW(agent_header, user_agent, request->lpHttpSession->lpAppInfo->agent); HTTP_HttpAddRequestHeadersW(request, agent_header, strlenW(agent_header), HTTP_ADDREQ_FLAG_ADD_IF_NEW); HeapFree(GetProcessHeap(), 0, agent_header); @@ -3673,7 +3673,7 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *request, LPCWSTR lpszHeaders, HTTP_ADDREQ_FLAG_ADD | HTTP_ADDHDR_FLAG_REPLACE); } - if (request->lpHttpSession->lpAppInfo->lpszProxy && request->lpHttpSession->lpAppInfo->lpszProxy[0]) + if (request->lpHttpSession->lpAppInfo->proxy && request->lpHttpSession->lpAppInfo->proxy[0]) { WCHAR *url = HTTP_BuildProxyRequestUrl(request); requestString = HTTP_BuildHeaderRequestString(request, request->lpszVerb, url, request->lpszVersion); @@ -3818,8 +3818,8 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *request, LPCWSTR lpszHeaders, { if (HTTP_DoAuthorization(request, szAuthValue, &request->pProxyAuthInfo, - request->lpHttpSession->lpAppInfo->lpszProxyUsername, - request->lpHttpSession->lpAppInfo->lpszProxyPassword, + request->lpHttpSession->lpAppInfo->proxyUsername, + request->lpHttpSession->lpAppInfo->proxyPassword, NULL)) { loop_next = TRUE; @@ -4453,8 +4453,8 @@ DWORD HTTP_Connect(appinfo_t *hIC, LPCWSTR lpszServerName, session->lpAppInfo = hIC; list_add_head( &hIC->hdr.children, &session->hdr.entry ); - if(hIC->lpszProxy && hIC->dwAccessType == INTERNET_OPEN_TYPE_PROXY) { - if(hIC->lpszProxyBypass) + if(hIC->proxy && hIC->accessType == INTERNET_OPEN_TYPE_PROXY) { + if(hIC->proxyBypass) FIXME("Proxy bypass is ignored.\n"); } session->lpszServerName = heap_strdupW(lpszServerName); @@ -4562,7 +4562,7 @@ static DWORD HTTP_OpenConnection(http_request_t *request) * behaviour to be more correct and to not cause any incompatibilities * because using a secure connection through a proxy server is a rare * case that would be hard for anyone to depend on */ - if (hIC->lpszProxy && (res = HTTP_SecureProxyConnect(request)) != ERROR_SUCCESS) { + if (hIC->proxy && (res = HTTP_SecureProxyConnect(request)) != ERROR_SUCCESS) { HTTPREQ_CloseConnection(&request->hdr); goto lend; } diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c index 5b42d98d7e2..0dbc5af94af 100644 --- a/dlls/wininet/internet.c +++ b/dlls/wininet/internet.c @@ -603,12 +603,12 @@ static BOOL INTERNET_ConfigureProxy( appinfo_t *lpwai ) if (wpi.dwProxyEnabled) { - lpwai->dwAccessType = INTERNET_OPEN_TYPE_PROXY; - lpwai->lpszProxy = wpi.lpszProxyServer; + lpwai->accessType = INTERNET_OPEN_TYPE_PROXY; + lpwai->proxy = wpi.lpszProxyServer; return TRUE; } - lpwai->dwAccessType = INTERNET_OPEN_TYPE_DIRECT; + lpwai->accessType = INTERNET_OPEN_TYPE_DIRECT; return FALSE; } @@ -681,11 +681,11 @@ static VOID APPINFO_Destroy(object_header_t *hdr) TRACE("%p\n",lpwai); - HeapFree(GetProcessHeap(), 0, lpwai->lpszAgent); - HeapFree(GetProcessHeap(), 0, lpwai->lpszProxy); - HeapFree(GetProcessHeap(), 0, lpwai->lpszProxyBypass); - HeapFree(GetProcessHeap(), 0, lpwai->lpszProxyUsername); - HeapFree(GetProcessHeap(), 0, lpwai->lpszProxyPassword); + HeapFree(GetProcessHeap(), 0, lpwai->agent); + HeapFree(GetProcessHeap(), 0, lpwai->proxy); + HeapFree(GetProcessHeap(), 0, lpwai->proxyBypass); + HeapFree(GetProcessHeap(), 0, lpwai->proxyUsername); + HeapFree(GetProcessHeap(), 0, lpwai->proxyPassword); } static DWORD APPINFO_QueryOption(object_header_t *hdr, DWORD option, void *buffer, DWORD *size, BOOL unicode) @@ -711,14 +711,14 @@ static DWORD APPINFO_QueryOption(object_header_t *hdr, DWORD option, void *buffe bufsize = *size; if (unicode) { - DWORD len = ai->lpszAgent ? strlenW(ai->lpszAgent) : 0; + DWORD len = ai->agent ? strlenW(ai->agent) : 0; *size = (len + 1) * sizeof(WCHAR); if(!buffer || bufsize < *size) return ERROR_INSUFFICIENT_BUFFER; - if (ai->lpszAgent) - strcpyW(buffer, ai->lpszAgent); + if (ai->agent) + strcpyW(buffer, ai->agent); else *(WCHAR *)buffer = 0; /* If the buffer is copied, the returned length doesn't include @@ -726,15 +726,15 @@ static DWORD APPINFO_QueryOption(object_header_t *hdr, DWORD option, void *buffe */ *size = len * sizeof(WCHAR); }else { - if (ai->lpszAgent) - *size = WideCharToMultiByte(CP_ACP, 0, ai->lpszAgent, -1, NULL, 0, NULL, NULL); + if (ai->agent) + *size = WideCharToMultiByte(CP_ACP, 0, ai->agent, -1, NULL, 0, NULL, NULL); else *size = 1; if(!buffer || bufsize < *size) return ERROR_INSUFFICIENT_BUFFER; - if (ai->lpszAgent) - WideCharToMultiByte(CP_ACP, 0, ai->lpszAgent, -1, buffer, *size, NULL, NULL); + if (ai->agent) + WideCharToMultiByte(CP_ACP, 0, ai->agent, -1, buffer, *size, NULL, NULL); else *(char *)buffer = 0; /* If the buffer is copied, the returned length doesn't include @@ -752,10 +752,10 @@ static DWORD APPINFO_QueryOption(object_header_t *hdr, DWORD option, void *buffe DWORD proxyBytesRequired = 0, proxyBypassBytesRequired = 0; LPWSTR proxy, proxy_bypass; - if (ai->lpszProxy) - proxyBytesRequired = (lstrlenW(ai->lpszProxy) + 1) * sizeof(WCHAR); - if (ai->lpszProxyBypass) - proxyBypassBytesRequired = (lstrlenW(ai->lpszProxyBypass) + 1) * sizeof(WCHAR); + if (ai->proxy) + proxyBytesRequired = (lstrlenW(ai->proxy) + 1) * sizeof(WCHAR); + if (ai->proxyBypass) + proxyBypassBytesRequired = (lstrlenW(ai->proxyBypass) + 1) * sizeof(WCHAR); if (*size < sizeof(INTERNET_PROXY_INFOW) + proxyBytesRequired + proxyBypassBytesRequired) { *size = sizeof(INTERNET_PROXY_INFOW) + proxyBytesRequired + proxyBypassBytesRequired; @@ -764,16 +764,16 @@ static DWORD APPINFO_QueryOption(object_header_t *hdr, DWORD option, void *buffe proxy = (LPWSTR)((LPBYTE)buffer + sizeof(INTERNET_PROXY_INFOW)); proxy_bypass = (LPWSTR)((LPBYTE)buffer + sizeof(INTERNET_PROXY_INFOW) + proxyBytesRequired); - pi->dwAccessType = ai->dwAccessType; + pi->dwAccessType = ai->accessType; pi->lpszProxy = NULL; pi->lpszProxyBypass = NULL; - if (ai->lpszProxy) { - lstrcpyW(proxy, ai->lpszProxy); + if (ai->proxy) { + lstrcpyW(proxy, ai->proxy); pi->lpszProxy = proxy; } - if (ai->lpszProxyBypass) { - lstrcpyW(proxy_bypass, ai->lpszProxyBypass); + if (ai->proxyBypass) { + lstrcpyW(proxy_bypass, ai->proxyBypass); pi->lpszProxyBypass = proxy_bypass; } @@ -784,10 +784,10 @@ static DWORD APPINFO_QueryOption(object_header_t *hdr, DWORD option, void *buffe DWORD proxyBytesRequired = 0, proxyBypassBytesRequired = 0; LPSTR proxy, proxy_bypass; - if (ai->lpszProxy) - proxyBytesRequired = WideCharToMultiByte(CP_ACP, 0, ai->lpszProxy, -1, NULL, 0, NULL, NULL); - if (ai->lpszProxyBypass) - proxyBypassBytesRequired = WideCharToMultiByte(CP_ACP, 0, ai->lpszProxyBypass, -1, + if (ai->proxy) + proxyBytesRequired = WideCharToMultiByte(CP_ACP, 0, ai->proxy, -1, NULL, 0, NULL, NULL); + if (ai->proxyBypass) + proxyBypassBytesRequired = WideCharToMultiByte(CP_ACP, 0, ai->proxyBypass, -1, NULL, 0, NULL, NULL); if (*size < sizeof(INTERNET_PROXY_INFOA) + proxyBytesRequired + proxyBypassBytesRequired) { @@ -797,16 +797,16 @@ static DWORD APPINFO_QueryOption(object_header_t *hdr, DWORD option, void *buffe proxy = (LPSTR)((LPBYTE)buffer + sizeof(INTERNET_PROXY_INFOA)); proxy_bypass = (LPSTR)((LPBYTE)buffer + sizeof(INTERNET_PROXY_INFOA) + proxyBytesRequired); - pi->dwAccessType = ai->dwAccessType; + pi->dwAccessType = ai->accessType; pi->lpszProxy = NULL; pi->lpszProxyBypass = NULL; - if (ai->lpszProxy) { - WideCharToMultiByte(CP_ACP, 0, ai->lpszProxy, -1, proxy, proxyBytesRequired, NULL, NULL); + if (ai->proxy) { + WideCharToMultiByte(CP_ACP, 0, ai->proxy, -1, proxy, proxyBytesRequired, NULL, NULL); pi->lpszProxy = proxy; } - if (ai->lpszProxyBypass) { - WideCharToMultiByte(CP_ACP, 0, ai->lpszProxyBypass, -1, proxy_bypass, + if (ai->proxyBypass) { + WideCharToMultiByte(CP_ACP, 0, ai->proxyBypass, -1, proxy_bypass, proxyBypassBytesRequired, NULL, NULL); pi->lpszProxyBypass = proxy_bypass; } @@ -883,16 +883,16 @@ HINTERNET WINAPI InternetOpenW(LPCWSTR lpszAgent, DWORD dwAccessType, lpwai->hdr.htype = WH_HINIT; lpwai->hdr.dwFlags = dwFlags; - lpwai->dwAccessType = dwAccessType; - lpwai->lpszProxyUsername = NULL; - lpwai->lpszProxyPassword = NULL; + lpwai->accessType = dwAccessType; + lpwai->proxyUsername = NULL; + lpwai->proxyPassword = NULL; - lpwai->lpszAgent = heap_strdupW(lpszAgent); + lpwai->agent = heap_strdupW(lpszAgent); if(dwAccessType == INTERNET_OPEN_TYPE_PRECONFIG) INTERNET_ConfigureProxy( lpwai ); else - lpwai->lpszProxy = heap_strdupW(lpszProxy); - lpwai->lpszProxyBypass = heap_strdupW(lpszProxyBypass); + lpwai->proxy = heap_strdupW(lpszProxy); + lpwai->proxyBypass = heap_strdupW(lpszProxyBypass); TRACE("returning %p\n", lpwai); diff --git a/dlls/wininet/internet.h b/dlls/wininet/internet.h index d9fa71604f6..8e3a6a97b16 100644 --- a/dlls/wininet/internet.h +++ b/dlls/wininet/internet.h @@ -220,12 +220,12 @@ struct _object_header_t typedef struct { object_header_t hdr; - LPWSTR lpszAgent; - LPWSTR lpszProxy; - LPWSTR lpszProxyBypass; - LPWSTR lpszProxyUsername; - LPWSTR lpszProxyPassword; - DWORD dwAccessType; + LPWSTR agent; + LPWSTR proxy; + LPWSTR proxyBypass; + LPWSTR proxyUsername; + LPWSTR proxyPassword; + DWORD accessType; } appinfo_t;