Re: truncate

Roy T. Fielding (fielding@kiwi.ICS.UCI.EDU)
Tue, 18 Feb 1997 00:38:58 -0800


In message <3308D578.2D30@Non-HP-Austria-om1.om.hp.com>, Georg Stingl writes:
>the trunc option doesn't work correctly in wwwstat.pl, 
>it does if you comment out the line.
>
>sub truncated
>{
>    local($_) = @_;
>    local(@levels);
>
>#   return $_ unless m#^/#;
># ^^^^^^^^^^^^^^^^^^^^^^^^^^
>
>    if ($TruncateFile) { s#[^/]+$##; }
>
>    if ($TruncateLevel > 0)

Let me guess -- you are looking at a proxy log, right?  The problem
with the above change is that it also truncates the non-URL section
names, like "All Icons".

If you want to use -trunc with proxies, you'll have to use

    return $_ unless m#^(/|[a-z+.]:)#i;


 ...Roy T. Fielding
    Department of Information & Computer Science    (fielding@ics.uci.edu)
    University of California, Irvine, CA 92697-3425    fax:+1(714)824-4056
    http://www.ics.uci.edu/~fielding/