my @params = ($id);
if ($base_format eq 'holdings_xml') {
- $method .= '.atomic';
push @params, $lib;
if ($format !~ /-full$/o) {
push @params, 1;
}
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";
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;
}