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

Re: [PATCH] Allow custom user agent string

From: David Glasser <glasser_at_davidglasser.net>
Date: 2007-11-15 21:40:49 CET

On Nov 15, 2007 12:37 PM, Stefan Kng <tortoisesvn@gmail.com> wrote:
> C. Michael Pilato wrote:
> > David Glasser wrote:
> >> On Nov 15, 2007 12:08 PM, C. Michael Pilato <cmpilato@collab.net> wrote:
> >>> Stefan Kng wrote:
> >>>> Hi,
> >>>>
> >>>> The attached patch removes the fixed user-agent strings used in the svn
> >>>> library and replaces them with a define. That way, svn clients can set
> >>>> that define to a custom user-agent string when compiling the library.
> >>>>
> >>>> If the client does not define a custom user-agent string, a default
> >>>> ("SVN/") is used (the same as before).
> >>> Stefan, are you aware of the fact that mod_dav_svn actually pays attention
> >>> the User-Agent header, specifically searching for those which begin with
> >>> "SVN/"? This is used in the LOCK handling code and, I think, the GET
> >>> response handler, too.
> >> How about adding a parenthesized identifier, like web browsers do?
> >
> > +1.
> >
> > We just need a #define for CUSTOM_USER_AGENT that our libraries use like so:
> >
> > "User-Agent: SVN/" SVN_VERSION " (" CUSTOM_USER_AGENT ")"
> >
> > (Or maybe we just ask that the CUSTOM_USER_AGENT value include the space and
> > parens ... whatever's easiest.)
>
> See attached patch. I haven't checked, but if mod_dav_svn only checks
> the beginning of the user-agent string, then this should work.
>
>
> Stefan
>
> --
> ___
> oo // \\ "De Chelonian Mobile"
> (_,\/ \_/ \ TortoiseSVN
> \ \_/_\_/> The coolest Interface to (Sub)Version Control
> /_/ \_\ http://tortoisesvn.net
>
> [[[
> Allow the user-agent string sent over http to be defined by the
> client. The define CLIENT_USER_AGENT is used as the string. If it is
> not defined, the default "SVN/" is used.

Let's call it SVN_CLIENT_USER_AGENT... No namespace stomping and all.
 a la SVN_DEBUG and friends.

--dave

-- 
David Glasser | glasser_at_davidglasser.net | http://www.davidglasser.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Nov 15 21:41:04 2007

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