Bugzilla – Attachment 170377 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.41 KB, created by
Kyle M Hall (khall)
on 2024-08-15 12:38:33 UTC
(
hide
)
Description:
Bug 37308: Add user-agent for SUSHI outgoing requests
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2024-08-15 12:38:33 UTC
Size:
1.41 KB
patch
obsolete
>From 19c9f1213a63a7b419a1f1129f43f814bdf575ed 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> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > 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 28a64619359..1f2f7de9a3d 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