diff options
author | link <link@localhost> | 2002-10-27 10:04:06 +0000 |
---|---|---|
committer | link <link@localhost> | 2002-10-27 10:04:06 +0000 |
commit | 255fc0b0213bfa49496d5f2dc026b928ab7ea6fa (patch) | |
tree | 9831f3afc82dba62b11df2bd0670608139988ebc | |
parent | ca6215486c562889d165deed061ff40448593b23 (diff) | |
download | markup-validator-255fc0b0213bfa49496d5f2dc026b928ab7ea6fa.zip markup-validator-255fc0b0213bfa49496d5f2dc026b928ab7ea6fa.tar.gz markup-validator-255fc0b0213bfa49496d5f2dc026b928ab7ea6fa.tar.bz2 |
Redirect to /check if there is gunk in PATH_INFO. Thanks to Bjoern Hoehrmann.
-rwxr-xr-x | httpd/cgi-bin/check | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check index ee4461b..1260389 100755 --- a/httpd/cgi-bin/check +++ b/httpd/cgi-bin/check @@ -9,7 +9,7 @@ # This source code is available under the license at: # http://www.w3.org/Consortium/Legal/copyright-software # -# $Id: check,v 1.271 2002-10-27 09:05:55 link Exp $ +# $Id: check,v 1.272 2002-10-27 10:04:06 link Exp $ # # Disable buffering on STDOUT! @@ -95,7 +95,7 @@ BEGIN { # # Strings - $VERSION = q$Revision: 1.271 $; + $VERSION = q$Revision: 1.272 $; $VERSION =~ s/Revision: ([\d\.]+) /$1/; @@ -157,7 +157,7 @@ $File->{'Header'} = &prepSSI({ }); $File->{'Footer'} = &prepSSI({ File => $CFG->{'Footer'}, - Date => q$Date: 2002-10-27 09:05:55 $, + Date => q$Date: 2002-10-27 10:04:06 $, }); # @@ -1907,8 +1907,21 @@ sub prepCGI { } # Futz the URI so "/referer" works. - $q->param('uri', 'referer') if $q->path_info eq '/referer'; - + if ($q->path_info) { + if ($q->path_info eq '/referer') { + $q->param('uri', 'referer'); + } else { + my $thispage = $File->{Env}->{'Self URI'}; + $thispage .= '?uri=' . $q->param('uri'); + $thispage .= ';ss=1' if $q->param('ss'); + $thispage .= ';sp=1' if $q->param('sp'); + $thispage .= ';noatt=1' if $q->param('noatt'); + $thispage .= ';outline=1' if $q->param('outline'); + + print $q->redirect($thispage); + exit; + } + } # Use "url" unless a "uri" was also given. if ($q->param('url') and not $q->param('uri')) { $q->param('uri', $q->param('url')); |