From 12b726b4dfe8ad3c5988ae02cb21604d0287e3a5 Mon Sep 17 00:00:00 2001 From: calvin Date: Wed, 9 Mar 2005 13:33:20 +0000 Subject: [PATCH] strip content type mime git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@2379 e7d03fd6-7b0d-0410-9947-9c21f3af8025 --- linkcheck/checker/httpurl.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linkcheck/checker/httpurl.py b/linkcheck/checker/httpurl.py index 088fc9b6..9ef4476a 100644 --- a/linkcheck/checker/httpurl.py +++ b/linkcheck/checker/httpurl.py @@ -589,8 +589,9 @@ class HttpUrl (urlbase.UrlBase, proxysupport.ProxySupport): """ ptype = self.headers.get('Content-Type', 'application/octet-stream') if ";" in ptype: + # split off not needed extension info ptype = ptype.split(';')[0] - return ptype + return ptype.strip() def is_parseable (self): """