Bugzilla – Attachment 104139 Details for
Bug 11994
Fix OpenSearch discovery in the OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11994: OpenSearch plugins needs to be delivered with Content-Type application/opensearchdescription+xml
Bug-11994-OpenSearch-plugins-needs-to-be-delivered.patch (text/plain), 2.35 KB, created by
David Nind
on 2020-05-01 21:04:49 UTC
(
hide
)
Description:
Bug 11994: OpenSearch plugins needs to be delivered with Content-Type application/opensearchdescription+xml
Filename:
MIME Type:
Creator:
David Nind
Created:
2020-05-01 21:04:49 UTC
Size:
2.35 KB
patch
obsolete
>From e1550908a1623b3c7f61b2aa4c639ab62e44e57f Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >Date: Fri, 1 May 2020 17:20:43 +0000 >Subject: [PATCH] Bug 11994: OpenSearch plugins needs to be delivered with > Content-Type application/opensearchdescription+xml > >https://developer.mozilla.org/en-US/docs/Web/OpenSearch >Your server should serve OpenSearch plugins using >Content-Type: application/opensearchdescription+xml. > >To test: >- Verify the Content-Type the file is delivered with > is correct, for example using wget > http://127.0.0.1:8080/cgi-bin/koha/opac-search.pl?format=opensearchdescription > >Signed-off-by: David Nind <david@davidnind.com> >--- > C4/Output.pm | 5 +++-- > opac/opac-search.pl | 2 +- > 2 files changed, 4 insertions(+), 3 deletions(-) > >diff --git a/C4/Output.pm b/C4/Output.pm >index 921c3a4ad0..8ea7bb51fa 100644 >--- a/C4/Output.pm >+++ b/C4/Output.pm >@@ -235,7 +235,7 @@ $content_type. > > If applicable, $cookie can be undef, and it will not be sent. > >-$content_type is one of the following: 'html', 'js', 'json', 'xml', 'rss', or 'atom'. >+$content_type is one of the following: 'html', 'js', 'json', 'opensearchdescription', 'xml', 'rss', or 'atom'. > > $status is an HTTP status message, like '403 Authentication Required'. It defaults to '200 OK'. > >@@ -259,7 +259,8 @@ sub output_with_http_headers { > # NOTE: not using application/atom+xml or application/rss+xml because of > # Internet Explorer 6; see bug 2078. > 'rss' => 'text/xml', >- 'atom' => 'text/xml' >+ 'atom' => 'text/xml', >+ 'opensearchdescription' => 'application/opensearchdescription+xml', > ); > > die "Unknown content type '$content_type'" if ( !defined( $content_type_map{$content_type} ) ); >diff --git a/opac/opac-search.pl b/opac/opac-search.pl >index 01887f283a..2dab3f8d9d 100755 >--- a/opac/opac-search.pl >+++ b/opac/opac-search.pl >@@ -1013,7 +1013,7 @@ $template->param( > add_to_some_public_shelves => $some_public_shelves, > ); > >-my $content_type = ($format eq 'rss' or $format eq 'atom') ? $format : 'html'; >+my $content_type = ($format eq 'rss' or $format eq 'atom' or $format eq 'opensearchdescription') ? $format : 'html'; > > # If GoogleIndicTransliteration system preference is On Set parameter to load Google's javascript in OPAC search screens > if (C4::Context->preference('GoogleIndicTransliteration')) { >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 11994
:
103866
|
103873
|
103874
|
104132
|
104133
|
104134
|
104135
|
104138
|
104139
|
104140
|
106092
|
106093
|
106094