mshtml: Move nsChannel's content type initialization to async_open_doc_uri.

oldstable
Jacek Caban 2008-01-10 22:13:07 +01:00 committed by Alexandre Julliard
parent a04641c15b
commit cbe9f974d6
2 changed files with 10 additions and 10 deletions

View File

@ -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);
}
}
}

View File

@ -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 {