Bugzilla – Attachment 188926 Details for
Bug 41143
Searching EBSCO packages results in 500 error due to Content-type
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41143: Do not include content-type header when searching packages
Bug-41143-Do-not-include-content-type-header-when-.patch (text/plain), 1.13 KB, created by
Jonathan Druart
on 2025-11-03 11:57:30 UTC
(
hide
)
Description:
Bug 41143: Do not include content-type header when searching packages
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-11-03 11:57:30 UTC
Size:
1.13 KB
patch
obsolete
>From 7cb6e5a743929e4e39a6da239b8b5d7e53f814ca Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 3 Nov 2025 12:57:05 +0100 >Subject: [PATCH] Bug 41143: Do not include content-type header when searching > packages > >--- > Koha/ERM/Providers/EBSCO.pm | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > >diff --git a/Koha/ERM/Providers/EBSCO.pm b/Koha/ERM/Providers/EBSCO.pm >index edaa61f6f80..30bb9ce3e55 100644 >--- a/Koha/ERM/Providers/EBSCO.pm >+++ b/Koha/ERM/Providers/EBSCO.pm >@@ -240,8 +240,12 @@ sub request { > $method => $base_url . $url, > undef, ( $payload ? encode_json($payload) : undef ) > ); >- $request->header( 'x-api-key' => $config->{api_key} ); >- $request->header( 'content-type' => 'application/json; charset=UTF-8' ); >+ $request->header( 'x-api-key' => $config->{api_key} ); >+ >+ if ( $url !~ m{/packages\?orderby=} ) { >+ $request->header( 'content-type' => 'application/json; charset=UTF-8' ); >+ } >+ > my $ua = LWP::UserAgent->new; > my $response = $ua->simple_request($request); > if ( $response->code >= 400 ) { >-- >2.34.1
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 41143
: 188926