1.08b - A minor improvement to XHTML / XML detection.
This commit is contained in:
parent
5658c2c310
commit
6a67f575d8
|
@ -1,3 +1,8 @@
|
|||
Version 1.08b:
|
||||
--------------
|
||||
|
||||
- A minor improvement to XHTML / XML detection.
|
||||
|
||||
Version 1.07b:
|
||||
--------------
|
||||
|
||||
|
|
|
@ -1913,14 +1913,17 @@ static void detect_mime(struct http_request* req, struct http_response* res) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (strstr((char*)sniffbuf, "<?xml")) {
|
||||
if (strstr((char*)sniffbuf, "<?xml") ||
|
||||
strstr((char*)sniffbuf, "<!DOCTYPE")) {
|
||||
|
||||
if (inl_strcasestr(sniffbuf, (u8*)"<!DOCTYPE html"))
|
||||
if (strstr((char*)sniffbuf, "<!DOCTYPE html") ||
|
||||
strstr((char*)sniffbuf, "http://www.w3.org/1999/xhtml"))
|
||||
res->sniff_mime_id = MIME_XML_XHTML;
|
||||
else
|
||||
res->sniff_mime_id = MIME_XML_GENERIC;
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
/* Do an unconvincing check for HTML once we ruled out
|
||||
|
|
Loading…
Reference in New Issue