Re: domains

Roy T. Fielding (fielding@kiwi.ICS.UCI.EDU)
Sat, 07 Jun 1997 16:59:24 -0700


>I have used wwwstat 2.01 and noticed that host.some.ru is in other domain
>than THIS.IS.HOST.TOO.RU. Are .ru and .RU from different countries??!
>This is only when I used -dns key.
>How to fix it?

Tim Mabbott sent me a fix for this problem.

....Roy

-- Forwarded message:

Date: Fri, 14 Feb 1997 14:46:21 -0500 (EST)
From: Tim Mabbott <tmabbott@hbs.edu>
To: fielding@ics.uci.edu
Subject: wwwstat - tiny bug + fix
Message-ID: <Pine.SOL.3.93.970214143153.16550A-100000@betelgeuse.hbs.edu>

Hi Roy,
        I'm working with wwwstat-2.01 (which is the latest release from
what I can tell) to help with our Server stats here at hbs.  First off I
wanted to say that it's a great product - thanks for placing it in the
public domain, you did a great job.

        I'm running it on a Sun Ultra with Solaris 2.5.1 and was getting
uppercase domains in the final report as well as lowercase, so that I
would have an "EDU" and an "edu" entry in the "Transfers by Client Domain"
section.  I looked around in your code - and noticed that you had a line
that was making sure domains were lowercase (tr/A-Z/a-z/).  Upon looking
closer I found that the "resolve" sub is called after this and realised
that it must be returning the domain in uppercase - I don't know if this
is platform dependant, (ie only solaris?) but the obvious fix is just to
repeat the conversion:
#APPROX LINE 1218
            if ($LookupDNS && ($dvalue = &resolve($host)))
            {   
# add here
                $dvalue  =~ tr/A-Z/a-z/;
                ...

Just wanted to let you know - thanks again...

Tim Mabbott
NOC
Harvard Business School