From d4f2f418e1f33e10ce35be3b0b200d94fa29e4d0 Mon Sep 17 00:00:00 2001 From: Jorge Arellano Cid Date: Mon, 27 Sep 2010 16:33:36 -0400 Subject: Allow viewing XHTML served as such --- src/misc.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/misc.c') diff --git a/src/misc.c b/src/misc.c index 14d6edc1..213b0ada 100644 --- a/src/misc.c +++ b/src/misc.c @@ -104,6 +104,7 @@ typedef struct ContentType_ { 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 @@ int a_Misc_content_type_check(const char *EntryType, const char *DetectedType) 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; } -- cgit v1.2.3