[merge] http multirange support

Michael Ellerman michael at ellerman.id.au
Tue Jul 18 09:24:20 BST 2006


On 7/18/06, Martin Pool <mbp at canonical.com> wrote:
> On 13 Jul 2006, John Arbash Meinel <john at arbash-meinel.com> wrote:
>
> > The attached diff is an implementation of multi range support for http
> > requests. It enables them on both http and urllib. And then goes one
> > step further to re-use the curl connections to enable keep-alive support.
> >
> > Thanks go to Michael Ellerman for writing the multi-range support, and
> > Johan Rydberg for some of the test suite. I finished up the test suite,
> > and have been abuse testing it for a little while.
> >
> > The branch is available from here:
> > http://bzr.arbash-meinel.com/branches/bzr/http/
>
> Well, that's a very nice performance improvement to see.  On the other
> hand failing to follow redirects is a substantial regression,
> particularly as people may still be trying to pull from bazaar-ng.org,
> which currently does a redirect.  (I suppose we could, and possibly
> should, change it so that /bzr just passes through, since they're still
> the same machine.)
>
> I presume there must be some reason why you had to turn off curl
> FOLLOWLOCATION but what was it?  If that won't work, perhaps we can
> raise a special exception class on the redirect and redo it in the
> Transport?

I think that's just a bug in the code that fakes a Urllib
response-type-object out of a pycurl response. When we get a redirect
we get the headers for the 301 followed by a blank linke and then the
headers for the 20x. Our code is (I think) confusing things and
returning the headers associated with the 301 and not those with the
200. In short I think we can fix it, pending some free time.

cheers




More information about the bazaar mailing list