[New-bugs-announce] [issue6452] urllib2.Request() will not work with long authorization headers

Jamal Fanaian report at bugs.python.org
Thu Jul 9 22:26:52 CEST 2009


New submission from Jamal Fanaian <jfanaian at gmail.com>:

While testing this bug report in Gwibber
https://bugs.launchpad.net/gwibber/+bug/397297 I found that using
urllib2.Request() with a long authorization would cause it to error and
not authenticate. I'm not sure if it is because the header wasn't being
passed or any other issue.

The header would fail when the value part of the authorization string
was 89 characters.

I was able to resolve the issue by using urllib2.HTTPBasicAuthHandler()
and urllib2.install_opener() to install it, instead of passing the
Authorization header directly to urllib2.Request().

Please let me know if I can provide more information to test the issue.

----------
components: Library (Lib)
messages: 90351
nosy: jamal
severity: normal
status: open
title: urllib2.Request() will not work with long authorization headers
type: behavior
versions: Python 2.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6452>
_______________________________________


More information about the New-bugs-announce mailing list