On Mon, 2008-05-12 at 15:57 -0400, Brian Long wrote:

> To be honest, I was analyzing my internal mirror's traffic using AWStats
> and instead of hard-coding urlgrabber = Linux (to analyze which OS's are
> visiting my mirror), I wanted to fix the root of the "problem" which is
> that urlgrabber does not mention the host OS in user agent.  Most other
> browsers do to some extent and many log analyzers key on the user agent
> to determine the OS and platform.
> 
> This RFE is obviously low-priority and not a functional issue.
> urlgrabber claims it's supported on various Unix platforms and Windows.
> If so, I was hoping it would change the user agent to list on which
> platform it was running.  In my case, I could theoretically modify
> AWstats to say urlgrabber = Linux, but that's not a true fix.

 So from the yum POV we recently added the yum and version to the UA ...
but I think that's as far as we go ... I mean in some ways it might be
nice to include the repo. ID or something, but I don't think we'd want
to add the arch ... that'd be more of a core urlgrabber change.
 And excluding browsers I just don't see many HTTP clients providing
more than "FOO/version" by default.

> Maybe if I supply a patch that is non-intrusive, it could be accepted
> for the next release.

 So if you want to work around log analysers, then as a yum plugin you
can do:

import yum.plugins

requires_api_version = '2.1'
plugin_type = (yum.plugins.TYPE_CORE,)

from urlgrabber.grabber import default_grabber
default_grabber.opts.user_agent += " Linux/x86_64/Fedora-8"

...and those 5 line will add the above string to the end. Working the
string out can only be another couple of lines[1].

>   By the way, I've seen that CVS contains patches a
> few months newer than the latest 3.0.1 release.  Are those going to be
> released as 3.0.2 in the future or not until something critical is
> patched?

 Yeh, atm. we've just added fixes to Fedora we know we want/need ...
AFAIK they aren't in upstream urlgrabber yet, and it's not obvious if
we'll get more active upstream(s) or we'll do something like move to
libcurl for yum 4.x.

[1] See config.py:readMainConfig()

-- 
James Antill <[EMAIL PROTECTED]>
Red Hat

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Yum-devel mailing list
[email protected]
https://lists.dulug.duke.edu/mailman/listinfo/yum-devel

Reply via email to