瀏覽代碼

Split content type correctly.

tags/v0.2
Ben Kurtovic 10 年之前
父節點
當前提交
ea14f39e73
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. +1
    -1
      earwigbot/wiki/copyvios/__init__.py

+ 1
- 1
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":


Loading…
取消
儲存