From caf8ba629785220370040e107da6200de4ed027b Mon Sep 17 00:00:00 2001 From: calvin Date: Mon, 16 Jun 2008 13:03:48 +0000 Subject: [PATCH] Really allow parsing of XHTML files; I forgot some places to adjust the MIME checking. git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@3818 e7d03fd6-7b0d-0410-9947-9c21f3af8025 --- linkcheck/checker/const.py | 1 + linkcheck/checker/httpurl.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/linkcheck/checker/const.py b/linkcheck/checker/const.py index a46a030d..28019d93 100644 --- a/linkcheck/checker/const.py +++ b/linkcheck/checker/const.py @@ -139,6 +139,7 @@ PARSE_EXTENSIONS = { PARSE_MIMETYPES = ( "text/html", + "application/xhtml+xml", "text/css", "application/x-shockwave-flash", ) diff --git a/linkcheck/checker/httpurl.py b/linkcheck/checker/httpurl.py index 73d75e14..af2631f2 100644 --- a/linkcheck/checker/httpurl.py +++ b/linkcheck/checker/httpurl.py @@ -606,7 +606,7 @@ Use URL %(newurl)s instead for checking.""") % { """ if not (self.valid and self.headers): return False - if headers.get_content_type(self.headers) != "text/html": + if headers.get_content_type(self.headers) not in ("text/html", "application/xhtml+xml"): return False return self.encoding_supported()