From f05446b0d898a278302a8f3058f56c9b30d8a592 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Tue, 29 Nov 2011 19:39:26 +0000 Subject: [PATCH] Rewrite path to icons in request git-svn-id: file:///srv/don_svn/deb_pkgs/libapache-gallery-perl/trunk@635 8f7917da-ec0b-0410-a553-b9b0e350d17e --- debian/changelog | 6 ++++++ lib/Apache/Gallery.pm | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 4133a8b..47d67d3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +libapache-gallery-perl (1.0.2-2) unstable; urgency=low + + * Rewrite path to icons in request + + -- Don Armstrong Sat, 26 Nov 2011 16:29:55 -0800 + libapache-gallery-perl (1.0.2-1) unstable; urgency=low * New upstream release diff --git a/lib/Apache/Gallery.pm b/lib/Apache/Gallery.pm index ee9f63a..e02bee9 100644 --- a/lib/Apache/Gallery.pm +++ b/lib/Apache/Gallery.pm @@ -120,7 +120,11 @@ sub handler { # Let Apache serve icons without us modifying the request if ($r->uri =~ m/^\/icons/i) { - return $::MP2 ? Apache2::Const::DECLINED() : Apache::Constants::DECLINED(); + if ($r->uri =~ m/^\/icons\/gallery\/([^\/]+$)/i) { + $filename = "/usr/share/libapache-gallery-perl/icons/$filename"; + $r->filename($filename); + } + return $::MP2 ? Apache2::Const::DECLINED() : Apache::Constants::DECLINED(); } # Lookup the file in the cache and scale the image if the cached # image does not exist -- 2.39.5