tpac : uri escape added content key
authorBill Erickson <berick@esilibrary.com>
Thu, 24 May 2012 14:30:09 +0000 (10:30 -0400)
committerMike Rylander <mrylander@gmail.com>
Fri, 25 May 2012 12:57:33 +0000 (08:57 -0400)
The added content key may have spaces, etc.  URI escape the key to
prevent Net::HTTP from croaking in the URL.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Record.pm

index 0a3935b..c7e9b4d 100644 (file)
@@ -440,7 +440,7 @@ sub added_content_stage1 {
             }
 
             my $http_type = ($type eq $sel_type) ? 'GET' : 'HEAD';
-            $req->write_request($http_type => "/opac/extras/ac/$type/html/$key");
+            $req->write_request($http_type => "/opac/extras/ac/$type/html/" . uri_escape($key));
             $ctx->{added_content}->{$type}->{request} = $req;
         }
     }