Jacek Caban : urlmon: Include extra info in object name passed to HttpOpenRequest.
Alexandre Julliard
julliard at winehq.org
Thu Dec 10 10:00:58 CST 2009
Module: wine
Branch: master
Commit: 90b1bcc1aefd27e7c8719ab7e906ecc9296bbb2b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=90b1bcc1aefd27e7c8719ab7e906ecc9296bbb2b
Author: Jacek Caban <jacek at codeweavers.com>
Date: Wed Dec 9 22:09:22 2009 +0100
urlmon: Include extra info in object name passed to HttpOpenRequest.
---
dlls/urlmon/http.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/dlls/urlmon/http.c b/dlls/urlmon/http.c
index bb81ec8..2e47b11 100644
--- a/dlls/urlmon/http.c
+++ b/dlls/urlmon/http.c
@@ -95,7 +95,7 @@ static HRESULT HttpProtocol_open_request(Protocol *prot, LPCWSTR url, DWORD requ
memset(&url_comp, 0, sizeof(url_comp));
url_comp.dwStructSize = sizeof(url_comp);
- url_comp.dwSchemeLength = url_comp.dwHostNameLength = url_comp.dwUrlPathLength =
+ url_comp.dwSchemeLength = url_comp.dwHostNameLength = url_comp.dwUrlPathLength = url_comp.dwExtraInfoLength =
url_comp.dwUserNameLength = url_comp.dwPasswordLength = 1;
if (!InternetCrackUrlW(url, 0, 0, &url_comp))
return MK_E_SYNTAX;
@@ -124,7 +124,12 @@ static HRESULT HttpProtocol_open_request(Protocol *prot, LPCWSTR url, DWORD requ
}
accept_mimes[num] = 0;
- path = heap_strndupW(url_comp.lpszUrlPath, url_comp.dwUrlPathLength);
+ path = heap_alloc((url_comp.dwUrlPathLength+url_comp.dwExtraInfoLength+1)*sizeof(WCHAR));
+ if(url_comp.dwUrlPathLength)
+ memcpy(path, url_comp.lpszUrlPath, url_comp.dwUrlPathLength*sizeof(WCHAR));
+ if(url_comp.dwExtraInfoLength)
+ memcpy(path+url_comp.dwUrlPathLength, url_comp.lpszExtraInfo, url_comp.dwExtraInfoLength*sizeof(WCHAR));
+ path[url_comp.dwUrlPathLength+url_comp.dwExtraInfoLength] = 0;
if(This->https)
request_flags |= INTERNET_FLAG_SECURE;
This->base.request = HttpOpenRequestW(This->base.connection,
More information about the wine-cvs
mailing list