From: miker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Date: Sun, 21 Feb 2010 04:47:35 +0000 (+0000)
Subject: stream holdings xml to the client
X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=9b20c52e7659fdc08cb9b9e77968c198cbe59a4d;p=contrib%2FConifer.git

stream holdings xml to the client

git-svn-id: svn://svn.open-ils.org/ILS/trunk@15605 dcc99617-32d9-48b4-a31d-7c20da2025e4
---

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;
 }