Update to new design

This commit is contained in:
Mario Fetka
2026-04-22 19:11:36 +02:00
parent 5a69a9532a
commit feb12eb0c5
14 changed files with 1095 additions and 624 deletions

View File

@@ -5,22 +5,8 @@
#
# Copyright 2001 Wilmer van der Gaast (lintux@lintux.cx)
#
# Updated with favicon and modern asset MIME type support.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#
sub handle_request()
{
@@ -32,6 +18,7 @@ sub handle_request()
}
$e = $f;
$e =~ s/^.*\.//;
$e = lc( $e );
if( $e eq 'html' )
{
$t = 'text/html';
@@ -40,22 +27,48 @@ sub handle_request()
{
$t = 'image/gif';
}
elsif( $e eq 'jpg' )
elsif( $e eq 'jpg' || $e eq 'jpeg' )
{
$t = 'image/jpeg';
}
elsif( $e eq 'png' )
{
$t = 'image/png';
}
elsif( $e eq 'ico' )
{
$t = 'image/x-icon';
}
elsif( $e eq 'svg' )
{
$t = 'image/svg+xml';
}
elsif( $e eq 'webp' )
{
$t = 'image/webp';
}
elsif( $e eq 'css' )
{
$t = 'text/css';
}
elsif( $e eq 'js' )
{
$t = 'application/javascript';
}
else
{
$t = 'application/octet-stream';
}
print <<EOF;
print <<EOF2;
HTTP/1.0 200 OK
Content-Type: $t
$server_id
EOF
while( <FILE> )
EOF2
binmode( FILE );
while( read( FILE, $buf, 8192 ) )
{
print;
print $buf;
}
close( FILE );
}