PATCH: set User-Agent string in HTTP transport
Martin Pool
mbp at sourcefrog.net
Mon Feb 6 12:15:39 GMT 2006
On 6 Feb 2006, James Henstridge <james.henstridge at gmail.com> wrote:
> On 06/02/06, Robert Collins <robertc at robertcollins.net> wrote:
> > 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.
>
> Good point. I've updated the test (attached) to use this approach.
> There was already a TestCaseWithWebserver in
> bzrlib.tests.HTTPTestUtil, so I used that.
>
> I also simplified the HttpServer initialisation code a little to let
> the OS allocate the port number rather than sequentially trying a
> range of ports to bind to. This should be a bit more robust than the
> existing code.
+1
--
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060206/194e1f91/attachment.pgp
More information about the bazaar
mailing list