mirror of
https://github.com/python/cpython.git
synced 2025-12-09 18:48:05 +00:00
Apply diff.txt from SF patch http://www.python.org/sf/561478
This uses cgi.parse_header() in Checker.checkforhtml(), so that webchecker recognises the mime type text/html even if options are specified.
This commit is contained in:
parent
478d47a168
commit
88a20baa77
1 changed files with 2 additions and 1 deletions
|
|
@ -117,6 +117,7 @@ import pickle
|
|||
import urllib
|
||||
import urlparse
|
||||
import sgmllib
|
||||
import cgi
|
||||
|
||||
import mimetypes
|
||||
import robotparser
|
||||
|
|
@ -543,7 +544,7 @@ class Checker:
|
|||
|
||||
def checkforhtml(self, info, url):
|
||||
if info.has_key('content-type'):
|
||||
ctype = string.lower(info['content-type'])
|
||||
ctype = string.lower(cgi.parse_header(info['content-type'])[0])
|
||||
else:
|
||||
if url[-1:] == "/":
|
||||
return 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue