Bug 8413

Summary: Space in barcode breaks GET request in benchmark_staff.pl
Product: Koha Reporter: Mirko Tietgen <mirko>
Component: Test SuiteAssignee: Mirko Tietgen <mirko>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P5 - low CC: chris, mjr, mtj, paul.poulain
Version: 3.8   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Who signed the patch off: Text to go in the release notes:
Version(s) released in:
Attachments: Bug 8413 Space in call number breaks GET request in benchmark_staff.pl
Bug 8413 Space in barcodes breaks GET request in benchmark_staff.pl
[PATCH] Bug 8413 Space in barcodes breaks GET request in benchmark_staff.pl
Bug 8413 Space in barcodes breaks GET request in benchmark_staff.pl

Description Mirko Tietgen 2012-07-10 21:43:41 UTC
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.

The bug led to really nice plack benchmarks. Unfortunately they were not true.
Comment 1 Mirko Tietgen 2012-07-10 21:45:39 UTC Comment hidden (obsolete)
Comment 2 Mirko Tietgen 2012-07-10 22:05:14 UTC Comment hidden (obsolete)
Comment 3 MJ Ray (software.coop) 2012-07-11 09:49:35 UTC
Could you use URI::Escape::uri_escape_utf8
	      instead of regexing, please?

Koha already depends on URI::Escape so that would not introduce a new requirement.
Comment 4 Mirko Tietgen 2012-07-11 11:14:26 UTC Comment hidden (obsolete)
Comment 5 Chris Cormack 2012-08-07 03:57:35 UTC
Created attachment 11397 [details] [review]
Bug 8413 Space in barcodes breaks GET request in benchmark_staff.pl

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.

Also fixes a typo.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Comment 6 Mason James 2012-08-10 05:41:09 UTC
(In reply to comment #5)
> Created attachment 11397 [details] [review]
> Bug 8413 Space in barcodes breaks GET request in benchmark_staff.pl
> 
> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

trivial patch, passing QA


mason@xen1:~/git/head$ koha-qa.pl 
        * 363e671 Bug 8413 Space in barcodes breaks GET request in benchmark_staff.pl
                misc/load_testing/benchmark_staff.pl

- perlcritic-progressive tests... OK
- perl -c syntax tests... OK
- xt/tt_valid.t tests... OK
- xt/author/valid-template.t tests... OK
Comment 7 Chris Cormack 2012-09-01 07:41:31 UTC
In 3.8.x