Hey fellow darcs users!

I've got something I've been wondering for a few weeks now and thought about testing it myself, but I think someone may have experience with this already:

How well does darcs deal with HTTP redirects? How many people make use of HTTP redirected URLs for repositories?

I'm worried that it might differ across HTTP libraries, but I'm expecting for the most part darcs handles redirects "transparently" with each HTTP library "just doing the right thing".

One particular scenario I'm interested in/curious about:

Suppose that darcs gets a HTTP redirect (particularly an HTTP 301 Permanent Redirect) for a few important files (say _darcs/format and/or _darcs/inventory) is it currently "smart" enough to switch to getting the rest of the files with relation to the redirected paths? If not, is there any interest in this as a feature/enhancement? (I'd be happy to submit it to round-up if that is the case.)

An example to illustrate the question / possibly preferred method of operation:

$ darcs get http://project.example.com/repo/
...
darcs asks for http://project.example.com/reponame/_darcs/format and is 301 redirected to http://repos.example.com/project/reponame/_darcs/format
...
darcs asks for http://project.example.com/reponame/_darcs/inventory and is 301 redirected to http://repos.example.com/project/reponame/_darcs/inventory
...
darcs skips trying http://project.example.com/reponame/_darcs/pristine.hashed/somepristinehash and directly requests http://repos.example.com/project/reponame/_darcs/pristine.hashed/somepristinehash
...

I haven't decided whether or not it would be nice/useful for darcs to subsequently modify defaultrepo (given the case that it is using the defaultrepo) to reflect a redirect.

Such redirection "smarts" can be useful for moving projects and also useful for load balancing (such as a nice, easy to remember repository URL redirecting to a faster/better server with a longer, less useful URL).

--
--Max Battcher--
http://worldmaker.net
_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to