From 42dea36e5aad11f7ac51052eeee2c5a1994e3a67 Mon Sep 17 00:00:00 2001 From: Misha Koshelev Date: Wed, 8 Aug 2007 20:24:57 -0500 Subject: [PATCH] urlmon: Do not use BindToStorage_hack for INTERNET_SCHEME_HTTP. --- dlls/urlmon/tests/url.c | 20 ++++++-------------- dlls/urlmon/umon.c | 9 +-------- 2 files changed, 7 insertions(+), 22 deletions(-) diff --git a/dlls/urlmon/tests/url.c b/dlls/urlmon/tests/url.c index f94edd8914a..1f7415ec8d8 100644 --- a/dlls/urlmon/tests/url.c +++ b/dlls/urlmon/tests/url.c @@ -641,12 +641,9 @@ static HRESULT WINAPI statusclb_OnDataAvailable(IBindStatusCallback *iface, DWOR download_state); data_available = TRUE; - if (0) - { - /* FIXME: Uncomment after removing BindToStorage hack. */ ok(pformatetc != NULL, "pformatetx == NULL\n"); if(pformatetc) { - if (mime_type[0]) { + if (mime_type[0]) todo_wine { clipfmt[0] = 0; ok(GetClipboardFormatName(pformatetc->cfFormat, clipfmt, sizeof(clipfmt)-1), "GetClipboardFormatName failed, error %d\n", GetLastError()); @@ -667,7 +664,6 @@ static HRESULT WINAPI statusclb_OnDataAvailable(IBindStatusCallback *iface, DWOR ok(U(*pstgmed).pstm != NULL, "pstm == NULL\n"); ok(pstgmed->pUnkForRelease != NULL, "pUnkForRelease == NULL\n"); } - } if(U(*pstgmed).pstm) { do hres = IStream_Read(U(*pstgmed).pstm, buf, 512, &readed); @@ -895,17 +891,16 @@ static void test_BindToStorage(int protocol, BOOL emul) DispatchMessage(&msg); } + todo_wine CHECK_NOT_CALLED(QueryInterface_IServiceProvider); CHECK_CALLED(GetBindInfo); CHECK_CALLED(OnStartBinding); if(emulate_protocol) { - todo_wine CHECK_NOT_CALLED(QueryInterface_IServiceProvider); CHECK_CALLED(Start); CHECK_CALLED(UnlockRequest); }else { if(test_protocol == HTTP_TEST) { - CHECK_NOT_CALLED(QueryInterface_IServiceProvider); - todo_wine CHECK_CALLED(QueryInterface_IHttpNegotiate); - todo_wine CHECK_CALLED(BeginningTransaction); + CHECK_CALLED(QueryInterface_IHttpNegotiate); + CHECK_CALLED(BeginningTransaction); /* QueryInterface_IHttpNegotiate2 and GetRootSecurityId * called on WinXP but not on Win98 */ CLEAR_CALLED(QueryInterface_IHttpNegotiate2); @@ -918,12 +913,9 @@ static void test_BindToStorage(int protocol, BOOL emul) CHECK_NOT_CALLED(OnProgress_CONNECTING); } CHECK_CALLED(OnProgress_SENDINGREQUEST); - todo_wine CHECK_CALLED(OnResponse); - todo_wine { CHECK_CALLED(OnProgress_MIMETYPEAVAILABLE); } - }else { - todo_wine CHECK_NOT_CALLED(QueryInterface_IServiceProvider); - CHECK_CALLED(OnProgress_MIMETYPEAVAILABLE); + CHECK_CALLED(OnResponse); } + CHECK_CALLED(OnProgress_MIMETYPEAVAILABLE); CHECK_CALLED(OnProgress_BEGINDOWNLOADDATA); if(test_protocol == HTTP_TEST) CLEAR_CALLED(OnProgress_DOWNLOADINGDATA); diff --git a/dlls/urlmon/umon.c b/dlls/urlmon/umon.c index b8c6bfeffff..c301d89b328 100644 --- a/dlls/urlmon/umon.c +++ b/dlls/urlmon/umon.c @@ -617,12 +617,6 @@ static HRESULT URLMonikerImpl_BindToStorage_hack(LPCWSTR URLName, dwService = INTERNET_SERVICE_GOPHER; break; - case INTERNET_SCHEME_HTTP: - if (!url.nPort) - url.nPort = INTERNET_DEFAULT_HTTP_PORT; - dwService = INTERNET_SERVICE_HTTP; - break; - case INTERNET_SCHEME_HTTPS: if (!url.nPort) url.nPort = INTERNET_DEFAULT_HTTPS_PORT; @@ -755,8 +749,7 @@ static HRESULT WINAPI URLMonikerImpl_BindToStorage(IMoniker* iface, return E_FAIL; } - if(url.nScheme == INTERNET_SCHEME_HTTP - || url.nScheme== INTERNET_SCHEME_HTTPS + if(url.nScheme== INTERNET_SCHEME_HTTPS || url.nScheme== INTERNET_SCHEME_FTP || url.nScheme == INTERNET_SCHEME_GOPHER) return URLMonikerImpl_BindToStorage_hack(This->URLName, pbc, pmkToLeft, riid, ppvObject);