Author: cwittich
Date: Sun Feb 1 07:46:44 2009
New Revision: 39266
URL:
http://svn.reactos.org/svn/reactos?rev=39266&view=rev
Log:
sync urlmon to wine 1.1.14
Modified:
trunk/reactos/dll/win32/urlmon/binding.c
trunk/reactos/dll/win32/urlmon/bindprot.c
trunk/reactos/dll/win32/urlmon/http.c
trunk/reactos/dll/win32/urlmon/umon.c
trunk/reactos/dll/win32/urlmon/urlmon.spec
Modified: trunk/reactos/dll/win32/urlmon/binding.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/binding.c…
==============================================================================
--- trunk/reactos/dll/win32/urlmon/binding.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/urlmon/binding.c [iso-8859-1] Sun Feb 1 07:46:44 2009
@@ -1183,6 +1183,8 @@
case BINDSTATUS_DIRECTBIND:
This->report_mime = FALSE;
break;
+ case BINDSTATUS_ACCEPTRANGES:
+ break;
default:
FIXME("Unhandled status code %d\n", ulStatusCode);
return E_NOTIMPL;
Modified: trunk/reactos/dll/win32/urlmon/bindprot.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/bindprot.…
==============================================================================
--- trunk/reactos/dll/win32/urlmon/bindprot.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/urlmon/bindprot.c [iso-8859-1] Sun Feb 1 07:46:44 2009
@@ -486,6 +486,7 @@
case BINDSTATUS_SENDINGREQUEST:
case BINDSTATUS_CACHEFILENAMEAVAILABLE:
case BINDSTATUS_DIRECTBIND:
+ case BINDSTATUS_ACCEPTRANGES:
case BINDSTATUS_MIMETYPEAVAILABLE:
if(!This->protocol_sink)
return S_OK;
Modified: trunk/reactos/dll/win32/urlmon/http.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/http.c?re…
==============================================================================
--- trunk/reactos/dll/win32/urlmon/http.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/urlmon/http.c [iso-8859-1] Sun Feb 1 07:46:44 2009
@@ -63,6 +63,7 @@
const IInternetProtocolVtbl *lpInternetProtocolVtbl;
const IInternetPriorityVtbl *lpInternetPriorityVtbl;
+ BOOL https;
DWORD flags, grfBINDF;
BINDINFO bind_info;
IInternetProtocolSink *protocol_sink;
@@ -309,7 +310,8 @@
LPOLESTR user_agent = NULL, accept_mimes[257];
HRESULT hres;
- static const WCHAR wszHttp[] =
{'h','t','t','p',':'};
+ static const WCHAR httpW[] =
{'h','t','t','p',':'};
+ static const WCHAR httpsW[] =
{'h','t','t','p','s',':'};
static const WCHAR wszBindVerb[BINDVERB_CUSTOM][5] =
{{'G','E','T',0},
{'P','O','S','T',0},
@@ -330,8 +332,9 @@
goto done;
}
- if (strlenW(szUrl) < sizeof(wszHttp)/sizeof(WCHAR)
- || memcmp(szUrl, wszHttp, sizeof(wszHttp)))
+ if(This->https
+ ? strncmpW(szUrl, httpsW, sizeof(httpsW)/sizeof(WCHAR))
+ : strncmpW(szUrl, httpW, sizeof(httpW)/sizeof(WCHAR)))
{
hres = MK_E_SYNTAX;
goto done;
@@ -351,7 +354,7 @@
user = strndupW(url.lpszUserName, url.dwUserNameLength);
pass = strndupW(url.lpszPassword, url.dwPasswordLength);
if (!url.nPort)
- url.nPort = INTERNET_DEFAULT_HTTP_PORT;
+ url.nPort = This->https ? INTERNET_DEFAULT_HTTPS_PORT :
INTERNET_DEFAULT_HTTP_PORT;
if(!(This->grfBINDF & BINDF_FROMURLMON))
IInternetProtocolSink_ReportProgress(This->protocol_sink,
BINDSTATUS_DIRECTBIND, NULL);
@@ -397,7 +400,9 @@
InternetSetStatusCallbackW(This->internet, HTTPPROTOCOL_InternetStatusCallback);
This->connect = InternetConnectW(This->internet, host, url.nPort, user,
- pass, INTERNET_SERVICE_HTTP, 0, (DWORD_PTR)This);
+ pass, INTERNET_SERVICE_HTTP,
+ This->https ? INTERNET_FLAG_SECURE : 0,
+ (DWORD_PTR)This);
if (!This->connect)
{
WARN("InternetConnect failed: %d\n", GetLastError());
@@ -421,6 +426,8 @@
request_flags |= INTERNET_FLAG_NO_CACHE_WRITE;
if (This->grfBINDF & BINDF_NEEDFILE)
request_flags |= INTERNET_FLAG_NEED_FILE;
+ if (This->https)
+ request_flags |= INTERNET_FLAG_SECURE;
This->request = HttpOpenRequestW(This->connect, This->bind_info.dwBindVerb
< BINDVERB_CUSTOM ?
wszBindVerb[This->bind_info.dwBindVerb] :
This->bind_info.szCustomVerb,
@@ -617,6 +624,9 @@
}
}
}
+
+ if(This->https)
+ IInternetProtocolSink_ReportProgress(This->protocol_sink,
BINDSTATUS_ACCEPTRANGES, NULL);
len = 0;
if ((!HttpQueryInfoW(This->request, HTTP_QUERY_CONTENT_TYPE, content_type,
&len, NULL) &&
@@ -923,36 +933,36 @@
HttpProtocol_UnlockRequest
};
-HRESULT HttpProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj)
+HRESULT create_http_protocol(BOOL https, void **ppobj)
{
HttpProtocol *ret;
- TRACE("(%p %p)\n", pUnkOuter, ppobj);
-
- URLMON_LockModule();
-
- ret = heap_alloc(sizeof(HttpProtocol));
+ ret = heap_alloc_zero(sizeof(HttpProtocol));
+ if(!ret)
+ return E_OUTOFMEMORY;
ret->lpInternetProtocolVtbl = &HttpProtocolVtbl;
ret->lpInternetPriorityVtbl = &HttpPriorityVtbl;
- ret->flags = ret->grfBINDF = 0;
- memset(&ret->bind_info, 0, sizeof(ret->bind_info));
- ret->protocol_sink = 0;
- ret->http_negotiate = 0;
- ret->internet = ret->connect = ret->request = 0;
- ret->full_header = 0;
- ret->lock = 0;
- ret->current_position = ret->content_length = ret->available_bytes = 0;
- ret->priority = 0;
+
+ ret->https = https;
ret->ref = 1;
*ppobj = PROTOCOL(ret);
+ URLMON_LockModule();
return S_OK;
}
+HRESULT HttpProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj)
+{
+ TRACE("(%p %p)\n", pUnkOuter, ppobj);
+
+ return create_http_protocol(FALSE, ppobj);
+}
+
HRESULT HttpSProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj)
{
- FIXME("(%p %p)\n", pUnkOuter, ppobj);
- return E_NOINTERFACE;
-}
+ TRACE("(%p %p)\n", pUnkOuter, ppobj);
+
+ return create_http_protocol(TRUE, ppobj);
+}
Modified: trunk/reactos/dll/win32/urlmon/umon.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/umon.c?re…
==============================================================================
--- trunk/reactos/dll/win32/urlmon/umon.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/urlmon/umon.c [iso-8859-1] Sun Feb 1 07:46:44 2009
@@ -532,7 +532,6 @@
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 @@
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,
@@ -647,28 +640,6 @@
bSuccess = TRUE;
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 @@
}
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);
@@ -1282,6 +1252,17 @@
}
/***********************************************************************
+ * HlinkSimpleNavigateToMoniker (URLMON.@)
+ */
+HRESULT WINAPI HlinkSimpleNavigateToMoniker(IMoniker *pmkTarget,
+ LPCWSTR szLocation, LPCWSTR szTargetFrameName, IUnknown *pUnk,
+ IBindCtx *pbc, IBindStatusCallback *pbsc, DWORD grfHLNF, DWORD dwReserved)
+{
+ FIXME("stub\n");
+ return E_NOTIMPL;
+}
+
+/***********************************************************************
* HlinkSimpleNavigateToString (URLMON.@)
*/
HRESULT WINAPI HlinkSimpleNavigateToString( LPCWSTR szTarget,
Modified: trunk/reactos/dll/win32/urlmon/urlmon.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/urlmon.sp…
==============================================================================
--- trunk/reactos/dll/win32/urlmon/urlmon.spec [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/urlmon/urlmon.spec [iso-8859-1] Sun Feb 1 07:46:44 2009
@@ -48,7 +48,7 @@
@ stub HlinkGoForward
@ stub HlinkNavigateMoniker
@ stdcall HlinkNavigateString(ptr wstr)
-@ stub HlinkSimpleNavigateToMoniker
+@ stdcall HlinkSimpleNavigateToMoniker(ptr wstr wstr ptr ptr ptr long long)
@ stdcall HlinkSimpleNavigateToString(wstr wstr wstr ptr ptr ptr long long)
@ stdcall IsAsyncMoniker(ptr)
@ stdcall IsLoggingEnabledA(str)