Author bradobro
Recipients bradobro
Date 2009-10-17.15:32:36
SpamBayes Score 0.00777734
Marked as misclassified No
Message-id <1255793559.46.0.185389780208.issue7159@psf.upfronthosting.co.za>
In-reply-to
Content
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
failure.

(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
bitbucket.org/bradobro/liquidhg/wiki/Home.
History
Date User Action Args
2009-10-17 15:32:39bradobrosetrecipients: + bradobro
2009-10-17 15:32:39bradobrosetmessageid: <1255793559.46.0.185389780208.issue7159@psf.upfronthosting.co.za>
2009-10-17 15:32:38bradobrolinkissue7159 messages
2009-10-17 15:32:37bradobrocreate