diff src/misc.c @ 1707:e44231f9c6ca

Allow viewing XHTML served as such
author Jorge Arellano Cid <jcid@dillo.org>
date Mon, 27 Sep 2010 16:33:36 -0400
parents f4a6b351012d
children aac29835ca8c
line wrap: on
line diff
--- a/src/misc.c	Mon Sep 13 19:20:16 2010 +0000
+++ b/src/misc.c	Mon Sep 27 16:33:36 2010 -0400
@@ -104,6 +104,7 @@
 
 static const ContentType_t MimeTypes[] = {
    { "application/octet-stream", 24 },
+   { "application/xhtml+xml", 21 },
    { "text/html", 9 },
    { "text/plain", 10 },
    { "image/gif", 9 },
@@ -341,7 +342,12 @@
               dStrncasecmp(DetectedType, "application/", 12)) {
       /* Not an application sent as text */
       st = 0;
+   } else if (dStrncasecmp(EntryType, "application/xhtml+xml", 21) &&
+              dStrncasecmp(DetectedType, "text/html", 9)) {
+      /* XML version of HTML */
+      st = 0;
    }
+   _MSG("Type check: %s\n", st == 0 ? "MATCH" : "MISMATCH");
 
    return st;
 }