PathNotChild: Path "http://url" is not a child of path "http://jakob@url": user name mismatch
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Undecided
|
Vincent Ladeuil |
Bug Description
This bug may be related to bug #245964.
When I try to access a bzr-repository over http that is protected by a user/password combo through the .htaccess file and gets redirected to another address I get the following problem:
PathNotChild: Path "http://
I tracked this particular problem down to the call to the following line in BzrDir.
relpath = transport.
The problem is that the qualified_source which comes from the errors.
transport.
This will give no user, because it is not passed along in the url, but this empty user is compared with transport._user. This actually raises the error above. The very exact problem occurs just a bit later, when a new transport is created with the target-url:
return get_transport(
This target also comes from the errors.
The easiest way to circumvent this problem is to make sure that qualified_source and target are passed with user/password in the url. I created a patch that does this in the next message.
Changed in bzr: | |
milestone: | none → 1.11rc1 |
status: | Fix Committed → Fix Released |
This is a quick and dirty patch for bzrdir.py that solves at least the particular problem I had.
Still, I believe the actual problem is on a much more basic level. Different functions work with different ideas about how to deal with possible authorization- tokens in urls. Some do deal with it, some don't. The Request-class even uses a dictionary for it. I guess this is the basic problem and needs to be standardized throughout bzr. So: pass only empty urls between functions and pass auth-tokens seperately, or always pass the full url always. But not sometimes the one, than the other.
Therefore I'm not completely sure whether this patch will solve all problems with redirection, since it seems slightly specialized to deal with http-urls.