From rgentlem at fhcrc.org  Fri Jul 28 21:40:19 2006
From: rgentlem at fhcrc.org (Robert Gentleman)
Date: Fri, 28 Jul 2006 12:40:19 -0700
Subject: [Rd] [R] HTTP User-Agent header
In-Reply-To: <Pine.LNX.4.64.0607282018330.10512@gannet.stats.ox.ac.uk>
References: <88a2333a0607280656r7f5b6e64ve6d03dd215433df2@mail.gmail.com>	<Pine.LNX.4.64.0607281538020.20596@gannet.stats.ox.ac.uk>	<m2u051k7c7.fsf@ziti.fhcrc.org>	<88a2333a0607281022i825d415l2840e47697a859fa@mail.gmail.com>	<44CA61A0.7090804@fhcrc.org>
	<Pine.LNX.4.64.0607282018330.10512@gannet.stats.ox.ac.uk>
Message-ID: <44CA6823.9010900@fhcrc.org>



Prof Brian Ripley wrote:
> On Fri, 28 Jul 2006, Robert Gentleman wrote:
> 
>> I wonder if it would not be better to make the user agent string 
>> something that is configurable (at the time R is built) rather than at 
>> run time. This would make Seth's patch about 1% as long. Or this could 
>> be handled as an option. The patches are pretty extensive and allow for 
>> setting the agent header by setting parameters in function calls (eg 
>> download.files). I am not sure there is a good use case for that level 
>> of flexibility and the additional code is substantial.
>>
>>
>> The issue that I think arises is that there are potentially other 
>> systems that will be unhappy with R's identification of itself and so 
>> some users may also need to turn it off.
> 
> I also thought that there was no need for this level of complexity. 
> (BTW, some of the patch is changes Seth has made for other purposes, e.g. 
> that to memory.c, so please no one apply all of it.)
> 
> I'd be happy for R to just identify itself as 'R', which seems allowed:
> (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).  But I am a bit 
> concerned that sites may not just require the field but also require a 
> particular format (even though W3C does not).

   For those of use that want to monitor downloads and get an idea of 
the size of the user base for different platforms (which helps to 
allocate resources) I think that we should try to include a bit more 
information.
  I could probably live with as little as R version, but would like to 
have OS there as well...

   best wishes
    Robert


> 
>> Any strong opinions?
>>
>>
>>
>> James P. Howard, II wrote:
>>> On 7/28/06, Seth Falcon <sfalcon at fhcrc.org> wrote:
>>>
>>>> I have a rough draft patch, see below, that adds a User-Agent header
>>>> to HTTP requests made in R via download.file.  If there is interest, I
>>>> will polish it.
>>> It looks right, but I am running under Windows without a compiler.
>>>
>>
> 

-- 
Robert Gentleman, PhD
Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M2-B876
PO Box 19024
Seattle, Washington 98109-1024
206-667-7700
rgentlem at fhcrc.org



[Rd] [R] HTTP User-Agent header
Robert Gentleman