projects
/
ssic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
66789c7
)
Set SCRIPT_FILENAME.
author
P. J. McDermott
<pjm@nac.net>
Sun, 22 Sep 2013 21:13:25 +0000
(17:13 -0400)
committer
P. J. McDermott
<pjm@nac.net>
Sun, 22 Sep 2013 21:13:25 +0000
(17:13 -0400)
src/ssic.pl
patch
|
blob
|
history
diff --git
a/src/ssic.pl
b/src/ssic.pl
index c12ff210b4046ae9cc72645def51ac4d1076f093..d678556be7716789249ad70d4c540e31f266ad71 100644
(file)
--- a/
src/ssic.pl
+++ b/
src/ssic.pl
@@
-105,6
+105,7
@@
sub compile
{
my ($input, $output, $vars, $root) = @_;
my $input_fh;
{
my ($input, $output, $vars, $root) = @_;
my $input_fh;
+ my $input_abs;
my $output_fh;
my $ssi;
my $var_name;
my $output_fh;
my $ssi;
my $var_name;
@@
-116,10
+117,12
@@
sub compile
if ($input eq "-") {
$input_fh = *STDIN;
if ($input eq "-") {
$input_fh = *STDIN;
+ $input_abs = File::Spec->rel2abs(".");
} else {
if (not open($input_fh, "<", $input)) {
error(4, "%s: %s\n", $input, $!);
}
} else {
if (not open($input_fh, "<", $input)) {
error(4, "%s: %s\n", $input, $!);
}
+ $input_abs = File::Spec->rel2abs($input);
}
if ($output eq "-") {
$output_fh = *STDOUT;
}
if ($output eq "-") {
$output_fh = *STDOUT;
@@
-129,10
+132,12
@@
sub compile
}
}
}
}
+ # CGI::SSI uses SCRIPT_FILENAME to determine the value of LAST_MODIFIED.
%ENV = (
"DOCUMENT_NAME" => $input,
"DOCUMENT_URI" => $input,
"DOCUMENT_ROOT" => $root,
%ENV = (
"DOCUMENT_NAME" => $input,
"DOCUMENT_URI" => $input,
"DOCUMENT_ROOT" => $root,
+ "SCRIPT_FILENAME" => $input_abs,
);
$CGI::SSI::DEBUG = 0;
);
$CGI::SSI::DEBUG = 0;