ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/myhttpd/diridx.pl
(Generate patch)

Comparing Coro/myhttpd/diridx.pl (file contents):
Revision 1.11 by root, Tue Aug 28 02:43:02 2001 UTC vs.
Revision 1.12 by root, Wed Aug 29 01:32:50 2001 UTC

1use List::Util qw(sum);
2
1use Storable (); 3use Storable ();
2 4
3my $SD_VERSION = 1; 5my $SD_VERSION = 1;
4 6
5my $ignore = qr/ ^(?:robots.txt$|\.) /x; 7my $ignore = qr/ ^(?:robots.txt$|\.) /x;
143 $stat .= "<td><a href='".escape_uri($_->[0])."'>$_->[0]</a><td align='right'>$_->[1]<td>&nbsp;"; 145 $stat .= "<td><a href='".escape_uri($_->[0])."'>$_->[0]</a><td align='right'>$_->[1]<td>&nbsp;";
144 } 146 }
145 $stat .= "</table>"; 147 $stat .= "</table>";
146 } 148 }
147 149
150 my $waiters = $::transfers->waiters*1;
151 my $avgtime = int (sum(@::wait_time) / @::wait_time);
152
148 <<EOF; 153 <<EOF;
149<html> 154<html>
150<head><title>$self->{uri}</title></head> 155<head><title>$self->{uri}</title></head>
151<body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#000080" alink="#ff0000"> 156<body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#000080" alink="#ff0000">
152<h1>$data->{path}</h1> 157<h1>$data->{path}</h1>
153$data->{top} 158$data->{top}
154<small><div align="right"><tt>$self->{remote_id}/$self->{country} - $::conns connection(s) - uptime $uptime - myhttpd/$VERSION</tt></div></small>
155<hr> 159<hr />
160clients waiting for data transfer: $waiters<br />
161average waiting time until transfer starts: $avgtime seconds <small>(adjust your timeout values)</small><br />
162<small><div align="right">
163 <tt>$self->{remote_id}/$self->{country} - $::conns connection(s) - uptime $uptime - myhttpd/$VERSION
164</tt></div></small>
165<hr />
156$stat 166$stat
157$data->{bot} 167$data->{bot}
158</body> 168</body>
159</html> 169</html>
160EOF 170EOF

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines