hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <garydgreg...@gmail.com>
Subject Re: Log misleading for User-Agent
Date Sat, 17 Nov 2012 01:42:26 GMT
On Fri, Nov 16, 2012 at 3:23 PM, Oleg Kalnichevski <olegk@apache.org> wrote:

> On Fri, 2012-11-16 at 17:33 +0000, sebb wrote:
> > On 16 November 2012 15:55, Oleg Kalnichevski <olegk@apache.org> wrote:
> > > On Fri, 2012-11-16 at 06:38 -0500, Jon Moore wrote:
> > >> Yes, I'd be in favor of either one of these changes (removing or
> > >> reporting dynamically the right version). I'd probably lean towards
> > >> removing it if pressed to express an opinion.
> > >>
> > >> As I recall (although I don't have the code in front of me), the
> > >> CachingHttpClient sends a slightly different User-Agent, mentioning
> > >> the fact that the cache is present in the stack in the comment field.
> > >> I think this made sense originally, when it was really an add-on
> > >> module. However, since Oleg is re-wiring the "stack" for the default
> > >> client in 4.3, that may not be needed any more.
> > >>
> > >> It could just be that I'm remembering the comment in the Via header
> > >> the caching layer adds, though; in which case the caching client
> > >> wouldn't modify the User-Agent.
> > >>
> > >> Jon
> > >>
> > >> On Thu, Nov 15, 2012 at 9:00 PM, Gary Gregory <garydgregory@gmail.com>
> wrote:
> > >> > Hi All:
> > >> >
> > >> > At the debug logging level I see:
> > >> >
> > >> > User-Agent: Apache-HttpClient/4.2.1 (java 1.5)
> > >> >
> > >> > But I am running on Java 6... so, Why is 1.5 hard coded?
> > >> >
> > >> > Could/Should we remove "(java 1.5)" or have it report the correct
> version?
> > >> >
> > >> > Thoughts?
> > >> >
> > >> > Gary
> > >> >
> > >
> > > If my memory serves me well the original intention was to include a
> > > minimal JRE version a particular release is compatible with.
> > >
> > > I am fine with either dropping it or replacing with a dynamically
> > > generated JRE version requests are generated with.
> >
> > Or replace with:
> >
> > User-Agent: Apache-HttpClient/4.2.1 (Java 1.5+)
> >
> > if we want to keep the original meaning (but clarify it).
> >
>
> Sounds very reasonable.
>
> > Do other user agents include OS/Java details in their UA strings?
> >
>
> I believe JRE's internal HTTP client does.
>

It is reasonable indeed, I'll give you that ;) but I find it slightly
confusing and of dubious value. So if we are doing to change it, I'd like
to discuss an alternative.

It is confusing because we have two versions in the string, but they
represent different concepts, one is a version stamp and the other a
platform requirement.

I find it of dubious value because I find it more interesting to know the
Java version of the user agent rather than what the minimum Java version
user agent requires to run.

But hey, that's me.

In my mind, the options are:

1) do nothing
2) User-Agent: Apache-HttpClient/4.2.1 (Java 1.5+ min)
3) User-Agent: Apache-HttpClient/4.2.1 (Java/1.6.0_35)

3 is in the spirit of the JRE's HttpURLConnection FWIW.

Gary

>
> Oleg
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> For additional commands, e-mail: dev-help@hc.apache.org
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message