From ea14f39e734e8dcdb2d4690471ee311ecb62b4aa Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Tue, 15 Jul 2014 19:01:32 -0400 Subject: [PATCH] Split content type correctly. --- earwigbot/wiki/copyvios/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/earwigbot/wiki/copyvios/__init__.py b/earwigbot/wiki/copyvios/__init__.py index e48feb3..305c572 100644 --- a/earwigbot/wiki/copyvios/__init__.py +++ b/earwigbot/wiki/copyvios/__init__.py @@ -82,7 +82,7 @@ class CopyvioMixIn(object): return None ctype_full = response.headers.get("Content-Type", "text/plain") - ctype = ctype_full.split(" ", 1)[0] + ctype = ctype_full.split("; ", 1)[0] if ctype in ["text/html", "application/xhtml+xml"]: return HTMLTextParser(result).strip() elif ctype == "text/plain":