[MERGE] [bug #256612] Don't require "user@" in HTTP(S) URLs that need auth

Ben Jansen aogail at w007.org
Wed Dec 17 19:37:57 GMT 2008


Re-submit with a non-rich-root merge directive.

- Ben Jansen

On Wed, 17 Dec 2008 10:05:46 -0800, Ben Jansen <aogail at w007.org> wrote:
> This is my first bzr patch, so please let me know if I've missed any
> required items.
> 
> Right now, to use HTTP auth with bzr, you have to include at least a
> username in the URL you want to work with. This patch removes that
> restriction.
> 
> This patch modifies AbstractAuthHandler so that, if bzr receives an HTTP
> 401 response from the server, it will look for *both* a username and
> password in the authentication config. If it does not find a username, it
> defaults to the local username. If it does not find a password, it
prompts
> the user. (The password behavior is unchanged.)
> 
> The code for doing this was mostly already present, but
> AbstractAuthHandler's auth_required() method had a condition in it that
> simply blocked any authentication attempt unless the user was already
> present in the request. That meant you had to pass it in the URL, e.g.,
> "http://user@domain/path".
> 
> I'm marking this as fixing bug #256612, although the behavior is not
> svn-specific. In addition to testing against a bzr smart server over
HTTP,
> I tested bzr with my patch against an svn-dav server, and it correctly
> prompts there, too.
> 
> Thanks,
> Ben Jansen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: httpauth.patch
Type: text/x-patch
Size: 3713 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20081217/0ebf1fd0/attachment.bin 


More information about the bazaar mailing list