#!/usr/bin/perl # strict.cgi v 1.1 # Copyright 2004 Toby Inkster # May be used, modified and redistributed under the terms of the GNU GPL. # http://www.gnu.org/copyleft/gpl.html $file = $ENV{'PATH_TRANSLATED'}; $date = `date --utc --rfc-2822 --reference='$file'`; chomp $date; $etag = $size . 'e-a-' . `date --utc --reference='$file' '+\%s'`; chomp $etag; $icon = < Valid HTML 4.01! EOF $cssicon = < Valid CSS! EOF $txt = `cat '$file'`; $txt =~ s/\$ICON\$/$icon/g; $txt =~ s/\$CSSICON\$/$cssicon/g; $txt = '' . "\n" . $txt; $size = length($txt); print "Content-Type: text/html; charset=utf-8\n"; print "Content-Length: $size\n"; print "Last-Modified: $date\n"; print "ETag: $etag\n"; print "\n"; print $txt;