Lei Zhang : wininet: Send https scheme to proxy server when appropriate.

Alexandre Julliard julliard at winehq.org
Thu May 22 06:27:26 CDT 2008


Module: wine
Branch: master
Commit: bd58463eda8e94deb75efa393ff7574d02c7e717
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=bd58463eda8e94deb75efa393ff7574d02c7e717

Author: Lei Zhang <thestig at google.com>
Date:   Wed May 21 19:04:10 2008 -0700

wininet: Send https scheme to proxy server when appropriate.

---

 dlls/wininet/http.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c
index a70bcff..119b49b 100644
--- a/dlls/wininet/http.c
+++ b/dlls/wininet/http.c
@@ -1263,14 +1263,18 @@ static WCHAR *HTTP_BuildProxyRequestUrl(WININETHTTPREQW *req)
     {
         static const WCHAR slash[] = { '/',0 };
         static const WCHAR format[] = { 'h','t','t','p',':','/','/','%','s',':','%','d',0 };
+        static const WCHAR formatSSL[] = { 'h','t','t','p','s',':','/','/','%','s',':','%','d',0 };
         WININETHTTPSESSIONW *session = req->lpHttpSession;
 
-        size = 15; /* "http://" + sizeof(port#) + ":/\0" */
+        size = 16; /* "https://" + sizeof(port#) + ":/\0" */
         size += strlenW( session->lpszHostName ) + strlenW( req->lpszPath );
 
         if (!(url = HeapAlloc( GetProcessHeap(), 0, size * sizeof(WCHAR) ))) return NULL;
 
-        sprintfW( url, format, session->lpszHostName, session->nHostPort );
+        if (req->hdr.dwFlags & INTERNET_FLAG_SECURE)
+            sprintfW( url, formatSSL, session->lpszHostName, session->nHostPort );
+        else
+            sprintfW( url, format, session->lpszHostName, session->nHostPort );
         if (req->lpszPath[0] != '/') strcatW( url, slash );
         strcatW( url, req->lpszPath );
     }




More information about the wine-cvs mailing list