[Python-checkins] python/dist/src/Tools/webchecker webchecker.py,1.26,1.27
doerwalter@users.sourceforge.net
doerwalter@users.sourceforge.net
Thu, 06 Jun 2002 10:01:24 -0700
Update of /cvsroot/python/python/dist/src/Tools/webchecker
In directory usw-pr-cvs1:/tmp/cvs-serv6787/Tools/webchecker
Modified Files:
webchecker.py
Log Message:
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.
Index: webchecker.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Tools/webchecker/webchecker.py,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** webchecker.py 8 Mar 2002 17:19:10 -0000 1.26
--- webchecker.py 6 Jun 2002 17:01:21 -0000 1.27
***************
*** 118,121 ****
--- 118,122 ----
import urlparse
import sgmllib
+ import cgi
import mimetypes
***************
*** 544,548 ****
def checkforhtml(self, info, url):
if info.has_key('content-type'):
! ctype = string.lower(info['content-type'])
else:
if url[-1:] == "/":
--- 545,549 ----
def checkforhtml(self, info, url):
if info.has_key('content-type'):
! ctype = string.lower(cgi.parse_header(info['content-type'])[0])
else:
if url[-1:] == "/":