Sfoglia il codice sorgente

Split content type correctly.

tags/v0.2
Ben Kurtovic 12 anni fa
parent
commit
ea14f39e73
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. +1
    -1
      earwigbot/wiki/copyvios/__init__.py

+ 1
- 1
earwigbot/wiki/copyvios/__init__.py Vedi File

@@ -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":


Caricamento…
Annulla
Salva