[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Add platform information to user agent string

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: Tue, 30 Oct 2012 14:42:42 -0400

On 10/30/2012 02:15 PM, Julian Foad wrote:
> Ivan Zhakov wrote:
>
>> On Tue, Oct 30, 2012 at 8:07 PM, Ben Reser wrote:
>>> On Tue, Oct 30, 2012 at 8:28 AM, Ivan Zhakov wrote:
>>>> I think it will be useful to add client platform information to
>>>> user agent string, to use it Apache HTTP Server configuration or
>>>> Subversion hooks. Within my patch applied user agent will be like
>>>> this: SVN/1.8.0 (Windows) serf/1.1.1 TortoiseSVN/1.8.0 SVN/1.8.0
>>>> (Macintosh) serf/1.1.1 SVN/1.8.0 (FreeBSD) serf/1.1.1
>>>
>>> Useful how?
>> For example to disable plain-text basic authentication on Windows. Or
>> disable commits from Linux using pre-commit hook.
>
> (1) Brane has recently added platform identification to the 'svn
> --version' command; is there any reason to use different code here
> producing a different set of platform identifiers? It would seem much
> better to share that code -- whether using just the 'platform' string or
> the whole 'platform-cpu-vendor' (or whatever it is) tuple -- so that the
> two sets of client identifiers cannot get out of sync.

Agreed that there should be a single canonical source of "build
information", and that the work Brane has done seems the reasonable best
candidate of such.

> (2) C-Mike Pilato (?) has recently added some sort of ability for
> pre-commit hooks to see more information (via txn-rev-props), which AFAIK
> was partly intended to let the hook see more info about the client
> platform. I don't know exactly what it does, but isn't that a more
> suitable place to put any new extensions of this kind of functionality?

By modifying the user-agent string in this fashion, Ivan is effectively
making use of my enhancements. And because of how he chose to do so, the
additional platform information will also show up in Apache log (like a
browser's User-Agent string does), too.

So, I've no complaints about the approach he used to make the changes. I
echo, though, the concern expressed here and elsethread about the static
list of platforms.

-- 
C. Michael Pilato <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Enterprise Cloud Development

Received on 2012-10-30 19:43:18 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.