Bugzilla – Attachment 77338 Details for
Bug 21122
Make check-url-quick.pl handle utf8 characters in urls gracefuly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21122: check-url-quick dies on utf8 characters in URL's
Bug-21122-check-url-quick-dies-on-utf8-characters-.patch (text/plain), 1.49 KB, created by
Jonathan Druart
on 2018-07-31 15:33:31 UTC
(
hide
)
Description:
Bug 21122: check-url-quick dies on utf8 characters in URL's
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-07-31 15:33:31 UTC
Size:
1.49 KB
patch
obsolete
>From f15de5c6bf12ebcb84bb165dc155a91c779d4629 Mon Sep 17 00:00:00 2001 >From: Liz Rea <liz@catalyst.net.nz> >Date: Thu, 26 Jul 2018 16:26:15 +1200 >Subject: [PATCH] Bug 21122: check-url-quick dies on utf8 characters in URL's >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >To test: > >Make a record with a URL that has a UTF8 character, such as: >http://some.nonexistent.tld/MÄoriWomenAotearoa.pdf >Run the check-url-quick.pl job, notice it dies at that URL >Apply this patch >Test again, it should work. > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > misc/cronjobs/check-url-quick.pl | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/misc/cronjobs/check-url-quick.pl b/misc/cronjobs/check-url-quick.pl >index f9b1c32020..22d2dfe461 100755 >--- a/misc/cronjobs/check-url-quick.pl >+++ b/misc/cronjobs/check-url-quick.pl >@@ -24,6 +24,7 @@ use C4::Context; > use C4::Biblio; > use AnyEvent; > use AnyEvent::HTTP; >+use Encode; > > my ( $verbose, $help, $html ) = ( 0, 0, 0 ); > my ( $host, $host_intranet ) = ( '', '' ); >@@ -96,6 +97,7 @@ sub check_all_url { > my $url = $field->subfield('u'); > next unless $url; > $url = "$host/$url" unless $url =~ /^http/i; >+ $url = encode_utf8($url); > $count++; > http_request( > HEAD => $url, >-- >2.11.0
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 21122
:
77277
|
77289
|
77338
|
77339