]> git.donarmstrong.com Git - deb_pkgs/libapache-gallery-perl.git/blobdiff - lib/Apache/Gallery.pm
Rewrite path to icons in request
[deb_pkgs/libapache-gallery-perl.git] / lib / Apache / Gallery.pm
index ee9f63af81e4c0ea3eaa09c7e11abdc556b9e366..e02bee91b384403cd8e4bc10334d4df3a7ed2c6e 100644 (file)
@@ -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