Module: wine Branch: master Commit: b9c348a0b30dca03f8d64f6a36a262a4784296ff URL: http://source.winehq.org/git/wine.git/?a=commit;h=b9c348a0b30dca03f8d64f6a36...
Author: Juan Lang juan.lang@gmail.com Date: Wed Mar 2 08:28:39 2011 -0800
wininet: Use correct scheme for cache entries.
---
dlls/wininet/http.c | 16 +++++++++++++--- 1 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index ae45b08..0467860 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -1533,15 +1533,25 @@ static DWORD HTTP_ResolveName(http_request_t *request)
static BOOL HTTP_GetRequestURL(http_request_t *req, LPWSTR buf) { + static const WCHAR http[] = { 'h','t','t','p',':','/','/',0 }; + static const WCHAR https[] = { 'h','t','t','p','s',':','/','/',0 }; + static const WCHAR slash[] = { '/',0 }; LPHTTPHEADERW host_header; - - static const WCHAR formatW[] = {'h','t','t','p',':','/','/','%','s','%','s',0}; + LPCWSTR scheme;
host_header = HTTP_GetHeader(req, hostW); if(!host_header) return FALSE;
- sprintfW(buf, formatW, host_header->lpszValue, req->path); /* FIXME */ + if (req->hdr.dwFlags & INTERNET_FLAG_SECURE) + scheme = https; + else + scheme = http; + strcpyW(buf, scheme); + strcatW(buf, host_header->lpszValue); + if (req->path[0] != '/') + strcatW(buf, slash); + strcatW(buf, req->path); return TRUE; }