Bugzilla – Attachment 168751 Details for
Bug 37308
Add user-agent to SUSHI outgoing requests
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37308: Add user-agent for SUSHI outgoing requests
Bug-37308-Add-user-agent-for-SUSHI-outgoing-reques.patch (text/plain), 1.35 KB, created by
Pedro Amorim
on 2024-07-10 15:55:03 UTC
(
hide
)
Description:
Bug 37308: Add user-agent for SUSHI outgoing requests
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2024-07-10 15:55:03 UTC
Size:
1.35 KB
patch
obsolete
>From ecdd31b2534eeac4d24530c64eb611e363faf64c Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Wed, 10 Jul 2024 15:07:22 +0000 >Subject: [PATCH] Bug 37308: Add user-agent for SUSHI outgoing requests > >Signed-off-by: Belal Ahmadi <belal.ahmadi@uwl.ac.uk> >--- > Koha/ERM/EUsage/UsageDataProvider.pm | 3 +++ > 1 file changed, 3 insertions(+) > >diff --git a/Koha/ERM/EUsage/UsageDataProvider.pm b/Koha/ERM/EUsage/UsageDataProvider.pm >index 28a6461935..1f2f7de9a3 100644 >--- a/Koha/ERM/EUsage/UsageDataProvider.pm >+++ b/Koha/ERM/EUsage/UsageDataProvider.pm >@@ -27,6 +27,7 @@ use Koha::Exceptions; > > use base qw(Koha::Object); > >+use Koha; > use Koha::ERM::EUsage::CounterFile; > use Koha::ERM::EUsage::CounterFiles; > use Koha::ERM::EUsage::UsageTitles; >@@ -176,6 +177,7 @@ sub harvest_sushi { > my $url = $self->_build_url_query; > my $request = HTTP::Request->new( 'GET' => $url ); > my $ua = LWP::UserAgent->new; >+ $ua->agent( 'Koha/' . Koha::version() ); > my $response = $ua->simple_request($request); > > if ( $response->code >= 400 ) { >@@ -279,6 +281,7 @@ sub test_connection { > > my $request = HTTP::Request->new( 'GET' => $url ); > my $ua = LWP::UserAgent->new; >+ $ua->agent( 'Koha/' . Koha::version() ); > my $response = $ua->simple_request($request); > > if ( $response->{_rc} >= 400 ) { >-- >2.39.2
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 37308
:
168746
|
168750
|
168751
|
170377
|
170378
|
170379