[Koha-patches] [PATCH] Bug 8413 Space in barcodes breaks GET request in benchmark_staff.pl

Mirko Tietgen 5p4m at gmx.de
Wed Jul 11 11:43:07 CEST 2012


GET requests in benchmark_staff.pl test 6 do not work if a space character is part of the barcode. That seems highly unlikely to happen in barcodes, but is possible if no real barcodes are used but a substitute, like a copy of the call number. Space character needs to be changed to %20 for the request to work.
---
 misc/load_testing/benchmark_staff.pl |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/misc/load_testing/benchmark_staff.pl b/misc/load_testing/benchmark_staff.pl
index ba659c9..19fb6bd 100644
--- a/misc/load_testing/benchmark_staff.pl
+++ b/misc/load_testing/benchmark_staff.pl
@@ -325,6 +325,7 @@ if ($steps=~ /6/) {
             my $rand_itemnumber = int(rand($itemnumber_max)+1);
             $sth->execute($rand_itemnumber);
             ($rand_barcode) = $sth->fetchrow();
+            ($rand_barcode) =~ s/ /%20/g;
         }
         push @issues,"$baseurl/circ/circulation.pl?borrowernumber=$rand_borrowernumber&barcode=$rand_barcode&issueconfirmed=1";
         push @returns,"$baseurl/circ/returns.pl?barcode=$rand_barcode";
-- 
1.7.2.5



More information about the Koha-patches mailing list