[MERGE][1.0][Bug 124089] Add root_client_path parameter to SmartWSGIApp, and use it to translate paths received from clients to local paths.

Andrew Bennetts andrew at canonical.com
Wed Dec 12 23:55:35 GMT 2007


Just some brief answers to let you know where I'm at...

Martin wrote:
> Okay, I updated my bzr to trunk and merged this branch, so I can
> review this for smart-smuggled-over-http, but what I say may be wrong
> for smart-elsewhere.
> 
[...]
> > Also, the same issue about forcing paths to start with '/' causing
> > problems on Windows. I do understand forcing them to end with a '/'.
> 
> Is this to make it safe to join a '.bzr/branch-format' etc on the end
> later? The smart server generally confuses me.

Basically, yes.

> > ...
> > Also, as you mentioned, the documentation http_smart_server.txt needs to
> > be updated.
> 
> I could cover this... where's the current copy under
> <http://doc.bazaar-vcs.org/bzr.dev/> though?

It's at
<http://doc.bazaar-vcs.org/bzr.dev/en/user-guide/index.html#serving-bazaar-with-fastcgi>.

[...]
> Secondly, I anticipated there might be an issue with shared
> repositories, as bzr used to climb up the dir structure on the server
> internally (past the chroot, even), and this patch looked like it
> might stop that. However, it seems now that even if the base repo dir
> is exposed, bzr+http will fail on repo-less branch - does not even
> attempt to get the parent dir from the outside.

I have code locally that works for bzr+http, even with a shared repository.
I'll be posting it to the list later today.  It involves some small tweaks on
the original patch I posted to this thread, some new logic in SmartWSGIApp (to
adjust the root_client_path using the path from URL, so that paths inside the
smart request can be adjusted correctly), and also some fixes to the paths sent
by the RemoteHTTPTransport in some cases.  And test suite changes from the
fallout of all that.

-Andrew.




More information about the bazaar mailing list