Commit cbe9f974 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

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

parent a04641c1
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment