Bug#580505: dput HTTP(S) auth fails with stack trace

2010-06-08 Thread sPOiDar
This won't affect Debian until they move to greater than python-2.5. 
The whole surrounding chunk of code is really quite ugly, and extremely
brittle - it's likely to break again whenever urllib2 changes in various
ways in the future.  Testing can be achieved simply by pointing at any
HTTPS enabled WebDAV server - doesn't have to actually have a queue
behind it.


signature.asc
Description: OpenPGP digital signature


Bug#580505: dput HTTP(S) auth fails with stack trace

2010-05-21 Thread Y Giridhar Appaji Nag
Hi Chow,

On 10/05/06 21:22 +0800, Chow Loong Jin said ...
 Uploading via HTTP(S) is currently broken when auth is enabled, and bails 
 with the following stack trace:
 
 [snip...]
 
 This bug was originally reported at 
 https://bugs.launchpad.net/ubuntu/+source/dput/+bug/531758.

Thanks a lot for forwarding this bug from ubuntu, I appreciate this a lot :-)

Just a note, does this happen with the current python default version in
Debian (2.5).  Also, would you know of any https server with an upload queue
where I can test this?

Cheers,

Giridhar

-- 
Y Giridhar Appaji Nag | http://people.debian.org/~appaji/


signature.asc
Description: Digital signature


Bug#580505: dput HTTP(S) auth fails with stack trace

2010-05-06 Thread Chow Loong Jin
Package: dput
Version: 0.9.5.1ubuntu1
Severity: normal
Tags: patch

Uploading via HTTP(S) is currently broken when auth is enabled, and bails with 
the following stack trace:

Uploading to hostname (via https to host.domain.tld):
  Uploading packagename.dsc: need authentication.
Password for Host Package Upload:
Traceback (most recent call last):
  File /usr/bin/dput, line 944, in module
main()
  File /usr/bin/dput, line 907, in main
files_to_upload, debug, 0, progress=progress)
  File /usr/share/dput/https.py, line 7, in upload
return real_upload(fqdn, login, incoming, files_to_upload, debug, dummy, 
progress, protocol=https)
  File /usr/share/dput/http.py, line 117, in upload
auth_headers = AuthHandlerHackAround(url, res.msg, pwman).get_auth_headers()
  File /usr/share/dput/http.py, line 51, in get_auth_headers
ah.http_error_401(self, None, 401, None, self.resp_headers)
  File /usr/lib/python2.6/urllib2.py, line 853, in http_error_401
url, req, headers)
  File /usr/lib/python2.6/urllib2.py, line 831, in http_error_auth_reqed
return self.retry_http_basic_auth(host, req, realm)
  File /usr/lib/python2.6/urllib2.py, line 841, in retry_http_basic_auth
return self.parent.open(req, timeout=req.timeout)

This bug was originally reported at 
https://bugs.launchpad.net/ubuntu/+source/dput/+bug/531758.

-- System Information:
Debian Release: squeeze/sid
  APT prefers lucid-updates
  APT policy: (500, 'lucid-updates'), (500, 'lucid-security'), (500, 
'lucid-proposed'), (500, 'lucid-backports'), (500, 'lucid')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.34-rc6-hyper1 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=en_SG.utf8, LC_CTYPE=en_SG.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages dput depends on:
ii  gnupg1.4.10-2ubuntu1 GNU privacy guard - a free PGP rep
ii  python   2.6.5-0ubuntu1  An interactive high-level object-o

dput recommends no packages.

Versions of packages dput suggests:
ii  bzr 2.1.1-1  easy to use distributed version co
ii  lintian 2.3.4ubuntu2 Debian package checker
pn  mini-dinstall   none   (no description available)
ii  openssh-client  1:5.3p1-3ubuntu3 secure shell (SSH) client, for sec
ii  rsync   3.0.7-1ubuntu1   fast remote file copy program (lik
pn  yaclc   none   (no description available)

-- no debconf information
--- a/http.py   2009-06-19 19:15:14.0 +1000
+++ b/http.py   2010-03-04 17:45:54.929487231 +1100
@@ -29,6 +29,7 @@
 self.url = url
 self.resp_headers = resp_headers
 self.authhandlers = []
+self.timeout = {}
 # digest untested
 for authhandler_class in [urllib2.HTTPBasicAuthHandler, 
urllib2.HTTPDigestAuthHandler]:
   ah = authhandler_class(pwman)
@@ -41,7 +42,7 @@
   def get_full_url(self):
 return self.url
   # fake parent method
-  def open(self,*args):
+  def open(self, *args, **keywords):
 pass
 
   # and what we really want