LP#845763 remote added content breaks collab/phasefx/local_content_fix_rel_2_1
authorJason Etheridge <jason@esilibrary.com>
Mon, 26 Sep 2011 18:40:19 +0000 (14:40 -0400)
committerJason Etheridge <jason@esilibrary.com>
Mon, 21 Nov 2011 15:47:58 +0000 (10:47 -0500)
remote added content breaks when using locally served content

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/WWW/AddedContent.pm

index 8701098..0e85a54 100644 (file)
@@ -78,11 +78,12 @@ sub handler {
     return Apache2::Const::DECLINED if (-e $r->filename);
 
     my $cgi = CGI->new;
-    my $path = $r->path_info;
+    my @path_parts = split( /\//, $r->unparsed_uri );
+    my $type = $path_parts[-3];
+    my $format = $path_parts[-2];
+    my $key = $path_parts[-1];
     my $res;
 
-    my( undef, $type, $format, $key ) = split(/\//, $r->path_info);
-
     child_init() unless $handler;
 
     return Apache2::Const::NOT_FOUND unless $handler and $type and $format and $key;