[Bug 1043326] Re: Fix for socks.py GeneralProxyError: (5, 'Bad Input')

Luca Falavigna dktrkranz at ubuntu.com
Thu Nov 29 12:30:21 UTC 2012


Fixed in 0.7.3 and later.
http://code.google.com/p/httplib2/source/detail?r=9ae3ddb265d4ec127e5458e1176420542ccf63ab

** Changed in: python-httplib2 (Ubuntu)
   Importance: Undecided => Medium

** Changed in: python-httplib2 (Ubuntu)
       Status: New => Fix Released

** Bug watch added: code.google.com/p/httplib2/issues #179
   http://code.google.com/p/httplib2/issues/detail?id=179

** Also affects: httplib2 via
   http://code.google.com/p/httplib2/issues/detail?id=179
   Importance: Unknown
       Status: Unknown

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to python-httplib2 in Ubuntu.
https://bugs.launchpad.net/bugs/1043326

Title:
  Fix for socks.py GeneralProxyError: (5, 'Bad Input')

Status in httplib2:
  Unknown
Status in “python-httplib2” package in Ubuntu:
  Fix Released

Bug description:
  I posted this bug in the software-center bug tracker too:
  https://bugs.launchpad.net/ubuntu/+source/software-center/+bug/1042882

  But maybe it belongs here.   In socks.py line 402, there is a type comparison of the type of the destination address to the type of a blank string:
          # Do a minimal input check first
          if (not type(destpair) in (list,tuple)) or (len(destpair) < 2) or (type(destpair[0]) != type('')) or (type(destpair[1]) != int):

  In my case the type of destpair[0] is not type(''), it is unicode - type(u''). I fixed the bug by modifying the above code in socks.py as follows:
          # Do a minimal input check first
          if (not type(destpair) in (list,tuple)) or (len(destpair) < 2) or (type(destpair[0]) != type('') and type(destpair[0]) != type(u'')) or (type(destpair[1]) != int):

To manage notifications about this bug go to:
https://bugs.launchpad.net/httplib2/+bug/1043326/+subscriptions




More information about the foundations-bugs mailing list