Bug 8413 - Space in barcode breaks GET request in benchmark_staff.pl
Summary: Space in barcode breaks GET request in benchmark_staff.pl
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: 3.8
Hardware: All All
: P5 - low normal (vote)
Assignee: Mirko Tietgen
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-10 21:43 UTC by Mirko Tietgen
Modified: 2013-12-05 19:59 UTC (History)
4 users (show)

See Also:
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 (1.33 KB, patch)
2012-07-10 21:45 UTC, Mirko Tietgen
Details | Diff | Splinter Review
Bug 8413 Space in barcodes breaks GET request in benchmark_staff.pl (1.33 KB, patch)
2012-07-10 22:05 UTC, Mirko Tietgen
Details | Diff | Splinter Review
[PATCH] Bug 8413 Space in barcodes breaks GET request in benchmark_staff.pl (1.95 KB, patch)
2012-07-11 11:14 UTC, Mirko Tietgen
Details | Diff | Splinter Review
Bug 8413 Space in barcodes breaks GET request in benchmark_staff.pl (1.95 KB, patch)
2012-08-07 03:57 UTC, Chris Cormack
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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