From 9b20c52e7659fdc08cb9b9e77968c198cbe59a4d Mon Sep 17 00:00:00 2001 From: miker Date: Sun, 21 Feb 2010 04:47:35 +0000 Subject: [PATCH] stream holdings xml to the client git-svn-id: svn://svn.open-ils.org/ILS/trunk@15605 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm b/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm index 00cc05e18b..f428b69bdd 100644 --- a/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm +++ b/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm @@ -540,7 +540,6 @@ sub unapi { my @params = ($id); if ($base_format eq 'holdings_xml') { - $method .= '.atomic'; push @params, $lib; if ($format !~ /-full$/o) { push @params, 1; @@ -548,9 +547,7 @@ sub unapi { } my $req = $supercat->request($method,@params); - my $data = $req->gather(1); - - $data = join('', @$data) if ($base_format eq 'holdings_xml'); + my $data = $req->gather(); if ($req->failed || !$data) { print "Content-type: text/html; charset=utf-8\n\n"; @@ -570,6 +567,12 @@ sub unapi { print "Content-type: application/xml; charset=utf-8\n\n$data"; + if ($base_format eq 'holdings_xml') { + while (my $c = $req->recv) { + print $c->content; + } + } + return Apache2::Const::OK; } -- 2.11.0