[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

webcheck fails completely



Package: webcheck
Version: 1.0-10
Severity: grave
Tags: patch
Justification: renders package unusable


webcheck uses the old httplib.HTTP interface, which it shouldn't really.
It also uses it in such a way that just doesn't work.  I include a
couple of patches which fix this, however.

-- System Information:
Debian Release: 3.1
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.10-9-amd64-k8
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages webcheck depends on:
ii  python                        2.3.4-6    An interactive high-level object-o

-- no debconf information
*** myUrlLib.py.orig	2005-02-03 21:07:49.140891258 +0000
--- myUrlLib.py	2005-02-03 21:12:10.639394746 +0000
***************
*** 27,32 ****
--- 27,33 ----
  from urllib import *
  from types import *
  import htmllib
+ import sgmllib
  import httplib
  import robotparser
  import string
***************
*** 150,158 ****
                  self.set_bad_link(url,str(data))
          except KeyboardInterrupt:
              raise KeyboardInterrupt
!         except:
              self.set_bad_link(url,"Error: Malformed URL?")
-             debugio.write("\t%s: %s" % (sys.exc_type, sys.exc_value),3)
              return
          
      def explore_children(self):
--- 151,158 ----
                  self.set_bad_link(url,str(data))
          except KeyboardInterrupt:
              raise KeyboardInterrupt
!         except sgmllib.SGMLParseError:
              self.set_bad_link(url,"Error: Malformed URL?")
              return
          
      def explore_children(self):
*** httplink.py.orig	2005-02-03 21:08:44.885657168 +0000
--- httplink.py	2005-02-03 21:09:29.450457984 +0000
***************
*** 60,70 ****
  
      (username, passwd, realhost, port) = parse_host(host)
  
-     h = httplib.HTTP()
      if port:
! 	h.connect(realhost, port)
      else:
! 	h.connect(realhost)
  
      h.putrequest('HEAD', document)
      if username and passwd:
--- 60,69 ----
  
      (username, passwd, realhost, port) = parse_host(host)
  
      if port:
! 	h = httplib.HTTP(host=realhost, port=port)
      else:
! 	h = httplib.HTTP(host=realhost)
  
      h.putrequest('HEAD', document)
      if username and passwd:

Reply to: