kohabug 2078 - settle on application/xml Content-type for feeds
authorGalen Charlton <galen.charlton@liblime.com>
Mon, 2 Jun 2008 15:53:38 +0000 (10:53 -0500)
committerJoshua Ferraro <jmf@liblime.com>
Tue, 3 Jun 2008 10:59:55 +0000 (05:59 -0500)
Required by IE6 to at least get a feed to display as XML
in the browser instead of being downloaded.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
opac/opac-search.pl

index 7c9b684..099b010 100755 (executable)
@@ -577,7 +577,8 @@ if ( C4::Context->preference("kohaspsuggest") ) {
 }
 
 # VI. BUILD THE TEMPLATE
-my $content_type = $cgi->param('format') =~ /rss/ ? "application/rss+xml" :
-                   $cgi->param('format') =~ /atom/ ? "application/atom+xml" :
+# NOTE: not using application/atom+xml or application/rss+xml beccause of Internet Explorer 6;
+# see bug 2078.
+my $content_type = $cgi->param('format') =~ /rss|atom/ ? "application/xml" :
                    "text/html";
 output_html_with_http_headers $cgi, $cookie, $template->output, $content_type;