Comment 1 for bug 1861012

Revision history for this message
Galen Charlton (gmc) wrote :

Bug confirmed. Something like this appears to help by ensuring that the unAPI request fully redirects to the intended record URL rather than, as appears to be the case currently, having the request be passed from the SuperCat::unapi handler to the record handler.

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm
index 2ba1f381a4..739d8f98ca 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm
@@ -737,9 +737,9 @@ sub unapi {
     }

     if ($format eq 'opac') {
- print "Location: $root/../../$locale/skin/$skin/xml/rresult.xml?m=$id&l=$lib_id&d=$lib_depth\n\n"
+ $apache->headers_out->add('Location' => "$root/../../$locale/skin/$skin/xml/rresult.xml?m=$id&l=$lib_id&d=$lib_depth")
             if ($type eq 'metarecord');
- print "Location: /eg/opac/record/$id?locg=$lib_id&depth=$lib_depth\n\n"
+ $apache->headers_out->add('Location' => "/eg/opac/record/$id?locg=$lib_id&depth=$lib_depth")
             if ($type eq 'record');
         return 302;
     } elsif (OpenILS::WWW::SuperCat::Feed->exists($base_format) && ($type ne 'acn' && $type ne 'acp' && $type ne 'auri')) {