Jacek Caban : mshtml: Fallback to text/ html mime type for document channel in nsIChannel::GetContentType.

Alexandre Julliard julliard at winehq.org
Fri Jan 27 11:30:41 CST 2012


Module: wine
Branch: master
Commit: 7ab1259a72030d0b469463fa2a2ac9a950ae26ba
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=7ab1259a72030d0b469463fa2a2ac9a950ae26ba

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Fri Jan 27 15:56:32 2012 +0100

mshtml: Fallback to text/html mime type for document channel in nsIChannel::GetContentType.

---

 dlls/mshtml/nsio.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c
index 8e7bdec..744e914 100644
--- a/dlls/mshtml/nsio.c
+++ b/dlls/mshtml/nsio.c
@@ -787,6 +787,12 @@ static nsresult NSAPI nsChannel_GetContentType(nsIHttpChannel *iface, nsACString
         return S_OK;
     }
 
+    if(This->uri->is_doc_uri) {
+        WARN("Document channel with no MIME set. Assuming text/html\n");
+        nsACString_SetData(aContentType, "text/html");
+        return S_OK;
+    }
+
     WARN("unknown type\n");
     return NS_ERROR_FAILURE;
 }




More information about the wine-cvs mailing list