summaryrefslogtreecommitdiffstats
path: root/www/index.cgi
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2007-01-08 23:52:01 +0000
committerBjörn Stenberg <bjorn@haxx.se>2007-01-08 23:52:01 +0000
commit6d4c19707ef95942e323cbdc89fbbfdbe45e7cc5 (patch)
treed11bbebc69df06d60970d05b4816e13d93602f2d /www/index.cgi
parent8cece5a745f30234bfced4becfd9dfe4ca1047d4 (diff)
downloadrockbox-6d4c19707ef95942e323cbdc89fbbfdbe45e7cc5.tar.gz
rockbox-6d4c19707ef95942e323cbdc89fbbfdbe45e7cc5.tar.bz2
rockbox-6d4c19707ef95942e323cbdc89fbbfdbe45e7cc5.zip
Splitting out www
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11952 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'www/index.cgi')
-rwxr-xr-xwww/index.cgi41
1 files changed, 0 insertions, 41 deletions
diff --git a/www/index.cgi b/www/index.cgi
deleted file mode 100755
index 401eb8f304..0000000000
--- a/www/index.cgi
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/perl
-
-# A very simple load balancing script:
-# If more than $nlim hits in under $tlim seconds, redirect to $mirror.
-#
-# 2002-01-24 Bjrn Stenberg <bjorn@haxx.se>
-
-# redirect is triggered by more than:
-$nlim = 10; # accesses in...
-$tlim = 10; # seconds
-$mirror = "http://rockbox.sourceforge.net/rockbox/";
-
-open FILE, "+<.load" or die "Can't open .load: $!";
-flock FILE, LOCK_EX;
-@a = <FILE>;
-if ( scalar @a > $nlim ) {
- $first = shift @a;
-}
-else {
- $first = $a[0];
-}
-$now = time();
-@a = ( @a, "$now\n" );
-truncate FILE, 0;
-seek FILE, 0, 0;
-for ( @a ) {
- print FILE $_;
-}
-flock FILE, LOCK_UN;
-close FILE;
-
-$diff = $now - $first;
-if ( $diff < $tlim ) {
- print "Location: $mirror\n\n";
-}
-else {
- print "Content-Type: text/html\n\n";
- open FILE, "<main.html" or die "Can't open main.html: $!\n";
- print <FILE>;
- close FILE;
-}