#7022 - CGI PERL Apache Redirect #2160

Closed
jsegarra wants to merge 10 commits from 5576_CGI_imagenes into dev
2 changed files with 2 additions and 4 deletions
Showing only changes of commit fd0a08489e - Show all commits

View File

@ -3,7 +3,7 @@
RewriteEngine On RewriteEngine On
RewriteMap rwmap prg:/usr/local/apache2/htdocs/rwmap.pl RewriteMap rwmap prg:/usr/local/apache2/htdocs/rwmap.pl
RewriteRule ^/image/catalog/(.+)$ ${rwmap:$1} [P] RewriteRule ^/image/catalog/(.+)$ ${rwmap:$1} [PT,QSA]
<Proxy *> <Proxy *>
Require all granted Require all granted

View File

@ -13,7 +13,7 @@ $baseUrl .= ":$serverPort" if ($serverPort != 80 && $serverPort != 443);
while (<STDIN>) { while (<STDIN>) {
chomp; chomp;
my $input = $_; my $input = $_;
print STDERR "DEBUG: Input recibido: $input\n"; # Mensaje de depuración print STDERR "DEBUG: Input recibido: $input\n"; # Mensaje de depuración
my ($path, $filename) = split('/', $input); my ($path, $filename) = split('/', $input);
if (defined $filename && $filename =~ /^(.+)\.(\w+)$/) { if (defined $filename && $filename =~ /^(.+)\.(\w+)$/) {
@ -32,7 +32,5 @@ while (<STDIN>) {
} }
} else { } else {
print "Status: 400 Bad Request\n"; print "Status: 400 Bad Request\n";
print "Content-type: text/plain\n\n";
print "Error: Invalid filename\n";
} }
} }