mshtml: Move nsChannel's content type initialization to async_open_doc_uri.
This commit is contained in:
parent
a04641c15b
commit
cbe9f974d6
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue