Subject: | [PATCH] 400 Error on Digest Auth using python urllib over Proxy |
Python's urllib uses an absoluteURI in the Digest header when talking to a proxy.
This absoluteURI is not accepted by Catalyst and the request always fails with a 400 status code without even checking the user/password.
This surfaced against the MusicBrainz server, using Catalyst for the Digest handling:
http://tickets.musicbrainz.org/browse/MBS-6185
There are also complete headers available for a test with and without a proxy in between.
Additionally there is a test available.
You don't need actual MusicBrainz usernames for the test. "test123:123" works fine, since the 400 error occurs even before checking the user/password.
Not all clients use an absoluteURI in the digest header, but python's urllib does this. There is a report for python for quite some time and the decision is, that what urllib does is fine according to the RFCs.
The absoluteURI should be handled by the server:
http://bugs.python.org/issue4140
I have a patch ready which I will submit after the ticket is open (referencing the ticket).
Additional info:
perl 5.14.2
Ubuntu Linux with 3.2.0 kernel