/[suikacvs]/test/comma/cgi-bin/comma-cvslog.cgi
Suika

Contents of /test/comma/cgi-bin/comma-cvslog.cgi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Fri Mar 11 12:54:15 2005 UTC (21 years, 4 months ago) by wakaba
Branch: MAIN
Changes since 1.1: +51 -26 lines
Now more strict code

1 wakaba 1.1 #!/usr/bin/perl
2    
3 wakaba 1.2 ## NOTE: This script must not be called other than from mod_rewrite
4 wakaba 1.1 use strict;
5    
6     my $path = $ENV{QUERY_STRING};
7     $path =~ s#^uri=##;
8     $path =~ s#,[^,]+$##;
9     $path =~ s/\#.*\z//s;
10     $path =~ s/\?.*\z//s;
11 wakaba 1.2 $path = decode_path (canon_path ($path));
12 wakaba 1.1
13     my $file;
14 wakaba 1.2 if ($path =~ s#^/~(hero|wakaba|fuyu)/##) {
15 wakaba 1.1 $file = qq'/home/$1/public_html/' . $path;
16     } else {
17     $file = '/home/httpd/html' . $path;
18     }
19    
20     my $dir = $file;
21     my $file_name = '';
22     $dir =~ s#/$##;
23     unless (-d $dir) {
24     $dir =~ s#/([^/]+)$