urlmon: Use pluggable protocol handler for https binding.
This commit is contained in:
parent
d4ce90e688
commit
1876f46bcf
@ -532,7 +532,6 @@ static HRESULT URLMonikerImpl_BindToStorage_hack(LPCWSTR URLName, IBindCtx* pbc,
|
|||||||
if(SUCCEEDED(hres)) {
|
if(SUCCEEDED(hres)) {
|
||||||
URL_COMPONENTSW url;
|
URL_COMPONENTSW url;
|
||||||
WCHAR *host, *path, *user, *pass;
|
WCHAR *host, *path, *user, *pass;
|
||||||
DWORD lensz = sizeof(bind->expected_size);
|
|
||||||
DWORD dwService = 0;
|
DWORD dwService = 0;
|
||||||
BOOL bSuccess;
|
BOOL bSuccess;
|
||||||
|
|
||||||
@ -597,12 +596,6 @@ static HRESULT URLMonikerImpl_BindToStorage_hack(LPCWSTR URLName, IBindCtx* pbc,
|
|||||||
url.nPort = INTERNET_DEFAULT_GOPHER_PORT;
|
url.nPort = INTERNET_DEFAULT_GOPHER_PORT;
|
||||||
dwService = INTERNET_SERVICE_GOPHER;
|
dwService = INTERNET_SERVICE_GOPHER;
|
||||||
break;
|
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,
|
bind->hconnect = InternetConnectW(bind->hinternet, host, url.nPort, user, pass,
|
||||||
@ -648,28 +641,6 @@ static HRESULT URLMonikerImpl_BindToStorage_hack(LPCWSTR URLName, IBindCtx* pbc,
|
|||||||
else
|
else
|
||||||
hres = HRESULT_FROM_WIN32(GetLastError());
|
hres = HRESULT_FROM_WIN32(GetLastError());
|
||||||
break;
|
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)
|
if(bSuccess)
|
||||||
{
|
{
|
||||||
@ -734,8 +705,7 @@ static HRESULT WINAPI URLMonikerImpl_BindToStorage(IMoniker* iface,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(IsEqualGUID(&IID_IStream, riid) &&
|
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))
|
|| url.nScheme == INTERNET_SCHEME_GOPHER))
|
||||||
return URLMonikerImpl_BindToStorage_hack(This->URLName, pbc, ppvObject);
|
return URLMonikerImpl_BindToStorage_hack(This->URLName, pbc, ppvObject);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user