From cbe9f974d6b86245155603aa1c7e9e529e7fa2c4 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Thu, 10 Jan 2008 22:13:07 +0100 Subject: [PATCH] mshtml: Move nsChannel's content type initialization to async_open_doc_uri. --- dlls/mshtml/navigate.c | 10 ---------- dlls/mshtml/nsio.c | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/dlls/mshtml/navigate.c b/dlls/mshtml/navigate.c index 3dd8e539a25..cc48b9330bd 100644 --- a/dlls/mshtml/navigate.c +++ b/dlls/mshtml/navigate.c @@ -887,16 +887,6 @@ void set_document_bscallback(HTMLDocument *doc, BSCallback *callback) if(callback) { IBindStatusCallback_AddRef(STATUSCLB(callback)); callback->doc = doc; - - if(doc->mime) { - DWORD len; - - heap_free(callback->nschannel->content); - - len = WideCharToMultiByte(CP_ACP, 0, doc->mime, -1, NULL, 0, NULL, NULL); - callback->nschannel->content = heap_alloc(len); - WideCharToMultiByte(CP_ACP, 0, doc->mime, -1, callback->nschannel->content, -1, NULL, NULL); - } } } diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c index cc4ea2fd430..0385f4ac25b 100644 --- a/dlls/mshtml/nsio.c +++ b/dlls/mshtml/nsio.c @@ -652,6 +652,16 @@ static nsresult async_open_doc_uri(nsChannel *This, NSContainer *container, container->bscallback->nscontext = context; } + if(container->doc && container->doc->mime) { + DWORD len; + + heap_free(This->content); + + len = WideCharToMultiByte(CP_ACP, 0, container->doc->mime, -1, NULL, 0, NULL, NULL); + This->content = heap_alloc(len); + WideCharToMultiByte(CP_ACP, 0, container->doc->mime, -1, This->content, -1, NULL, NULL); + } + if(do_load_from_moniker_hack(This)) return WINE_NS_LOAD_FROM_MONIKER; }else {