From bb2d70c55b0ffec24f6a545bb7aba55a78a3f52c Mon Sep 17 00:00:00 2001 From: miker Date: Fri, 27 Jul 2007 16:41:33 +0000 Subject: [PATCH] content types git-svn-id: svn://svn.open-ils.org/ILS/trunk@7591 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm b/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm index a35ffb2274..f8a61d23a4 100644 --- a/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm +++ b/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm @@ -79,7 +79,10 @@ sub handler { 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 + HEADER @@ -194,6 +197,7 @@ sub handler { } 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 } -- 2.11.0