New submission from Jamal Fanaian <jfana...@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 <rep...@bugs.python.org>
<http://bugs.python.org/issue6452>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to