PATCH: set User-Agent string in HTTP transport

Robert Collins robertc at robertcollins.net
Mon Feb 6 06:38:23 GMT 2006


On Mon, 2006-02-06 at 14:25 +0800, James Henstridge wrote:
> On 03/02/06, Robert Collins <robertc at robertcollins.net> wrote:
> > Although for added value I would -love- to see an http transport test
> > for this, one that tests all the http transports :).
> 
> Here's a small test of the feature.  It starts a simple HTTP server
> bound to localhost in a thread, and gets that server to return the
> request's user-agent header in the response body.

Thanks James. We actually have all the machinery to do that already in
bzrlib.transport.http.HttpServer - it should be a simple matter (i.e.
using 'TestCaseWithHTTPServer' which already exists) to use that in
writing the test - i.e. by having it log the user agent as one of the
fields in the log of the request. I think this would be better than a
whole new server-in-a-thread implementation.

Rob

-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060206/ed6733bd/attachment.pgp 


More information about the bazaar mailing list