urlmon: Use pluggable protocol handler for https binding.

This commit is contained in:
Jacek Caban 2009-01-12 18:20:21 +01:00 committed by Alexandre Julliard
parent d4ce90e688
commit 1876f46bcf
1 changed files with 1 additions and 31 deletions

View File

@ -532,7 +532,6 @@ static HRESULT URLMonikerImpl_BindToStorage_hack(LPCWSTR URLName, IBindCtx* pbc,
if(SUCCEEDED(hres)) {
URL_COMPONENTSW url;
WCHAR *host, *path, *user, *pass;
DWORD lensz = sizeof(bind->expected_size);
DWORD dwService = 0;
BOOL bSuccess;
@ -597,12 +596,6 @@ static HRESULT URLMonikerImpl_BindToStorage_hack(LPCWSTR URLName, IBindCtx* pbc,
url.nPort = INTERNET_DEFAULT_GOPHER_PORT;
dwService = INTERNET_SERVICE_GOPHER;
break;
case INTERNET_SCHEME_HTTPS:
if (!url.nPort)
url.nPort = INTERNET_DEFAULT_HTTPS_PORT;
dwService = INTERNET_SERVICE_HTTP;
break;
}
bind->hconnect = InternetConnectW(bind->hinternet, host, url.nPort, user, pass,
@ -648,28 +641,6 @@ static HRESULT URLMonikerImpl_BindToStorage_hack(LPCWSTR URLName, IBindCtx* pbc,
else
hres = HRESULT_FROM_WIN32(GetLastError());
break;
case INTERNET_SERVICE_HTTP:
bind->hrequest = HttpOpenRequestW(bind->hconnect, NULL, path, NULL, NULL, NULL, 0, (DWORD_PTR)bind);
if (!bind->hrequest)
{
hres = HRESULT_FROM_WIN32(GetLastError());
}
else if (!HttpSendRequestW(bind->hrequest, NULL, 0, NULL, 0))
{
hres = HRESULT_FROM_WIN32(GetLastError());
InternetCloseHandle(bind->hrequest);
}
else
{
HttpQueryInfoW(bind->hrequest,
HTTP_QUERY_CONTENT_LENGTH | HTTP_QUERY_FLAG_NUMBER,
&bind->expected_size,
&lensz,
NULL);
bSuccess = TRUE;
}
break;
}
if(bSuccess)
{
@ -734,8 +705,7 @@ static HRESULT WINAPI URLMonikerImpl_BindToStorage(IMoniker* iface,
}
if(IsEqualGUID(&IID_IStream, riid) &&
( url.nScheme == INTERNET_SCHEME_HTTPS
|| url.nScheme == INTERNET_SCHEME_FTP
( url.nScheme == INTERNET_SCHEME_FTP
|| url.nScheme == INTERNET_SCHEME_GOPHER))
return URLMonikerImpl_BindToStorage_hack(This->URLName, pbc, ppvObject);