PATCH: set User-Agent string in HTTP transport

John A Meinel john at arbash-meinel.com
Sun Feb 12 17:24:56 GMT 2006


James Henstridge wrote:
> On 07/02/06, James Henstridge <james.henstridge at gmail.com> wrote:
>> On 07/02/06, Martin Pool <mbp at sourcefrog.net> wrote:
>>> On  7 Feb 2006, James Henstridge <james.henstridge at gmail.com> wrote:
>>>
>>>> Okay, the user-agent change, the added test, and the HttpServer fix
>>>> are all on my branch ready to be merged:
>>>>
>>>>     http://people.ubuntu.com/~jamesh/bzr.smallfixes
>>> The change looks good but merging that to bzr.dev causes a failure in
>>> bzrlib.tests.test_fetch.TestHttpFetch.test_weaves_are_retrieved_once
>> Sorry about that.  I've fixed this test and verified that bzr selftest
>> passes.  The changes have been pushed now.
> 
> I made a few more small modifications to this branch:
>  * make the test_http_has() test verify that a HEAD request is issued
>  * make HttpTransport.has() issue a HEAD request rather than a GET.
> 
> I realise that there are plans to do a wholesale replacement of the
> HTTP transport, but the change to use HEAD should help reduce the
> bandwidth usage a little til then, and the tests would probably still
> be useful with a new HttpTransport implementation.
> 
> James.

Thanks, we've been wanting to do this for a while. And even when Martin
gets his pyCurl improvements in, it will be nice to have the test.
Looking over it, I wanted to make a couple of comments, and then we
probably can merge it in.

The downside is because people knew has did a complete fetch, I don't
think it got used. People switched to the try/except NoSuchFile, rather
than using has(). This might still be better, since it would be one less
round trip. (The bandwidth savings is probably small versus the latency
of querying twice).

In general, you changes look good to me. +1

If nobody else comments, give me a ping in a couple of days, and I'll
merge you.

John
=:->


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060212/653ac135/attachment.pgp 


More information about the bazaar mailing list