Bugzilla – Attachment 150182 Details for
Bug 32995
Koha agent string not sent for OverDrive fulfillment requests
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32995: Pass user agent string for OverDrive fulfillment
Bug-32995-Pass-user-agent-string-for-OverDrive-ful.patch (text/plain), 1.44 KB, created by
Magnus Enger
on 2023-04-25 07:53:50 UTC
(
hide
)
Description:
Bug 32995: Pass user agent string for OverDrive fulfillment
Filename:
MIME Type:
Creator:
Magnus Enger
Created:
2023-04-25 07:53:50 UTC
Size:
1.44 KB
patch
obsolete
>From aa1c508e7dfa3c0ad61e33963c3ef0e0b9d573e5 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 17 Feb 2023 13:01:02 +0000 >Subject: [PATCH] Bug 32995: Pass user agent string for OverDrive fulfillment > >This patch simply adds the string Koha/VERSION to the fulfillment >request > >TO test: >1 - Have OverDrive credentials for testing >2 - Enable all the overdrive options in system preferences >3 - Sign in to opac with an overdrive user and verify you can checkout > and download titles >4 - Sign off > >Signed-off-by: Magnus Enger <magnus@libriotech.no> >Not tested with OverDrive, but change looks harmless enough. >--- > Koha/ExternalContent/OverDrive.pm | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/Koha/ExternalContent/OverDrive.pm b/Koha/ExternalContent/OverDrive.pm >index 6c6ccf1ae8..bf355a2d4a 100644 >--- a/Koha/ExternalContent/OverDrive.pm >+++ b/Koha/ExternalContent/OverDrive.pm >@@ -23,6 +23,7 @@ use Carp qw( croak ); > use base qw(Koha::ExternalContent); > use WebService::ILS::OverDrive::Patron; > use C4::Context; >+use Koha; > use LWP::UserAgent; > > =head1 NAME >@@ -223,6 +224,7 @@ sub checkout_download_url { > > my $ua = LWP::UserAgent->new; > $ua->max_redirect(0); >+ $ua->agent( 'Koha/'.Koha::version() ); > my $response = $ua->get( > "https://patron.api.overdrive.com/v1/patrons/me/checkouts/".$item_id."/formats/downloadredirect", > 'Authorization' => "Bearer ".$self->client->access_token, >-- >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 32995
:
146841
|
150182
|
151124