Bugzilla – Attachment 122177 Details for
Bug 28603
check-url-quick.pl does not encode spaces in urls
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28603: Encode spaces in urls in url checker
Bug-28603-Encode-spaces-in-urls-in-url-checker.patch (text/plain), 1.56 KB, created by
Nick Clemens (kidclamp)
on 2021-06-18 19:43:18 UTC
(
hide
)
Description:
Bug 28603: Encode spaces in urls in url checker
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2021-06-18 19:43:18 UTC
Size:
1.56 KB
patch
obsolete
>From 6ed3c90afcd120ad5844aa5e2c989dce6aecb210 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 18 Jun 2021 19:40:44 +0000 >Subject: [PATCH] Bug 28603: Encode spaces in urls in url checker > >To test: >1 - Add a url to a record like: > http://localhost:8081/cgi-bin/koha/catalogue/search.pl?idx=ti&q=street%20shuffle >2 - perl misc/cronjobs/check-url-quick.pl -v > test.txt >3 - grep shuffle test.txt >4 - 303 http://localhost:8081/cgi-bin/koha/catalogue/search.pl?idx=ti&q=street shuffle 596 Connection timed out >5 - Apply patch >6 - perl misc/cronjobs/check-url-quick.pl -v > test.txt >7 - grep shuffle test.txt >8 - 303 http://localhost:8081/cgi-bin/koha/catalogue/search.pl?idx=ti&q=street%20shuffle 200 OK >--- > 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 93fcd97a10..e214dc8180 100755 >--- a/misc/cronjobs/check-url-quick.pl >+++ b/misc/cronjobs/check-url-quick.pl >@@ -27,6 +27,7 @@ use C4::Biblio; > use AnyEvent; > use AnyEvent::HTTP; > use Encode; >+use URI::Escape; > > my ( $verbose, $help, $html ) = ( 0, 0, 0 ); > my ( $host, $host_intranet ) = ( '', '' ); >@@ -100,6 +101,7 @@ sub check_all_url { > next unless $url; > $url = "$host/$url" unless $url =~ /^http/i; > $url = encode_utf8($url); >+ $url = uri_escape( $url, " " ); > $count++; > http_request( > HEAD => $url, >-- >2.20.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 28603
:
122177
|
122182