[Bug 6267] New: custom http user-agent in check-url.pl (fix for books.google.com 401 error)
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6267 Bug #: 6267 Summary: custom http user-agent in check-url.pl (fix for books.google.com 401 error) Classification: Unclassified Change sponsored?: --- Product: Koha Version: rel_3_2 Platform: All OS/Version: All Status: NEW Severity: trivial Priority: P5 Component: Command-line Utilities AssignedTo: gmcharlt@gmail.com ReportedBy: judit@calyx.net.au QAContact: koha-bugs@lists.koha-community.org After running check-url.pl on couple of Koha instances i noticed that every single URL from books.google.com came back with 401 Unauthorized error, even though the URLs were very much alive. I have changed the http user-agent, and now it works OK. Here is my fix: koha/koha.git/misc/cronjobs# diff check-url.pl check-url-calyx.pl 88c88 < my ($class, $timeout) = @_; ---
my ($class, $timeout, $agent) = @_;
91a92
$uagent->agent( $agent) if $agent;
159a161
my $agent = ''; 166a169 'agent=s' => \$agent, 187c190 < my $checker = C4::URL::Checker->new($timeout);
my $checker = C4::URL::Checker->new($timeout,$agent);
246c249 < =item check-url.pl [--verbose|--help] [--host=http://default.tld] ---
=item check-url.pl [--verbose|--help|--agent] [--host=http://default.tld] 266a270,275 =item B<--agent>
Change default libwww user-agent string to custom. Some sites does not like libwww user agent and so check-url gives error even if the site works from browser.
Please note that i am not a perl developer. The patch has been tested on several Koha installs, but there might be a nicer solution out there. Sponsored by CALYX information essentials. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6267 --- Comment #1 from MJ Ray (software.coop) <mjr@software.coop> --- Created attachment 8913 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=8913&action=edit Bug 6267 – custom http user-agent in check-url.pl (fix for books.google.com 401 error) Patch by Judit with a small change to the help wording. Sponsored by CALYX information essentials. -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6267 MJ Ray (software.coop) <mjr@software.coop> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff CC| |mjr@software.coop -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6267 MJ Ray (software.coop) <mjr@software.coop> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|rel_3_2 |master -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6267 --- Comment #2 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 8937 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=8937&action=edit Bug 6267 custom http user-agent in check-url.pl (fix for books.google.com 401 error) Patch by Judit with a small change to the help wording. Sponsored by CALYX information essentials. Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6267 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #8913|0 |1 is obsolete| | -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6267 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |chris@bigballofwax.co.nz -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6267 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |7963 -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6267 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |m.de.rooy@rijksmuseum.nl QA Contact|koha-bugs@lists.koha-commun |m.de.rooy@rijksmuseum.nl |ity.org | --- Comment #3 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- QA Comment: Looks good to me. Did not test it. Patch only touches a cron job, no template changes or translation issues. Passed QA. -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6267 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |paul.poulain@biblibre.com Version|master |rel_3_6 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6267 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic@tamil.fr --- Comment #4 from Frédéric Demians <frederic@tamil.fr> --- Due to this patch, check-url.pl script fails with this error: syntax error at ./check-url.pl line 168, near "$agent;" syntax error at ./check-url.pl line 170, near ")" Execution of ./check-url.pl aborted due to compilation errors (#1) See also alternative check URL script: bug 7963. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6267 --- Comment #5 from Frédéric Demians <frederic@tamil.fr> --- Created attachment 9769 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=9769&action=edit Fix a typo -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6267 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #8937|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6267 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |In Discussion -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6267 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6267 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #9769|0 |1 is obsolete| | --- Comment #6 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 9833 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=9833&action=edit Bug 6267: [SIGNED-OFF]Fix a typo Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6267 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |jonathan.druart@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6267 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #7 from Paul Poulain <paul.poulain@biblibre.com> --- QA comment : tiny & obvious patch replacing a ; by a , to avoid an error -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6267 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #8 from Paul Poulain <paul.poulain@biblibre.com> --- Patch pushed on master branch, I can't push it on new/bug_6267 Should be backported in 3.8 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6267 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #9 from Chris Cormack <chris@bigballofwax.co.nz> --- Pushed to 3.8.x will be in 3.8.2 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org