[open-ils-commits] r7591 - trunk/Open-ILS/src/perlmods/OpenILS/WWW
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Jul 27 12:42:48 EDT 2007
Author: miker
Date: 2007-07-27 12:41:33 -0400 (Fri, 27 Jul 2007)
New Revision: 7591
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm
Log:
content types
Modified: trunk/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm 2007-07-27 16:41:18 UTC (rev 7590)
+++ trunk/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm 2007-07-27 16:41:33 UTC (rev 7591)
@@ -79,7 +79,10 @@
my $ses = OpenSRF::AppSession->create('open-ils.cstore');
- print <<" HEADER" if ($format eq 'XML');
+ print "Content-type: application/octet-stream\n\n" if (uc($format) ne 'XML');
+ print <<" HEADER" if (uc($format) eq 'XML');
+Content-type: application/xml
+
<?xml version="1.0" encoding="$encoding"?>
<collection xmlns='http://www.loc.gov/MARC21/slim'>
HEADER
@@ -194,6 +197,7 @@
} elsif (uc($format) eq 'UNIMARC') {
print $r->as_unimarc
} elsif (uc($format) eq 'USMARC') {
+ print "Content-type: application/octet-stream\n\n";
print $r->as_usmarc
}
More information about the open-ils-commits
mailing list