Author bradobro
Recipients bradobro
Date 2009-10-17.15:32:36
SpamBayes Score 0.00777734
Marked as misclassified No
Message-id <>
For each request requiring HTTP authentication, urllib2 submits the
request without authentication, receives the server's 401
error/challenge, then re-submits the request with authentication.

This is compliant behavior. The problem comes in that urllib2 repeats
this for every ensuing request to the same namespace.

At times this is just an inefficiency--every request gets sent twice,
often with POST data (which can be sizeable).

Sometimes, especially with large POST bodies, this causes a connection

(Mercurial suffers greatly from this (and I have suggested workaround to
that team.)

This isn't non-compliant behavior, but RFC2617 (sections 2, 3.3)
suggests that once an HTTP client authenticates, it pre-emptively send
authentication with ensuing requests.

More analysis and fix suggestions at
Date User Action Args
2009-10-17 15:32:39bradobrosetrecipients: + bradobro
2009-10-17 15:32:39bradobrosetmessageid: <>
2009-10-17 15:32:38bradobrolinkissue7159 messages
2009-10-17 15:32:37bradobrocreate