When running under plack the parameters in the url passed to overdrive are separated by semi-colons as opposed to ampersands example, dumping $query->query_string from /opac/svc/overdrive_proxy under plack we have: 'q=howard%20wigglebottom;limit=1;offset=0' If the page is excluded from plack we get: 'q=howard%20wigglebottom&limit=1&offset=0' You can test in a rest client, the first will return spurious results, searches in opac will report one number of hits, clicking the link for results will return none or a different number of hits from overdrive Tried removing the qw(-oldstyle-urls) from the script but it had no effect, though without that when excluded from plack things also don't work This is verified under master and 3.22 under plack
Created attachment 56016 [details] [review] Bug 17392: Make svc/overdrive_proxy plack safe
Just a try, I am not able to test the whole workflow. Please test and adapt if needed. I think that the problem comes from the fact that the CGI->new method is overwritten from the psgi file.
(In reply to Jonathan Druart from comment #2) > Just a try, I am not able to test the whole workflow. > Please test and adapt if needed. > I think that the problem comes from the fact that the CGI->new method is > overwritten from the psgi file. And so the -oldstyle_urls pragma is not taken into account.
Created attachment 56054 [details] [review] Bug 17392 - opac/svc/overdrive_proxy is not plack safe This patch simply replaces the ';' in the param passed to OverDrive with '&' To test: 1 - Enable overdrive (requires an account) 2 - Perform an opac search 3 - Note the number of overdrive results reported 4 - Click the link to view the actualt overdrive results 5 - Note the result numbers don't match 6 - Apply patch 7 - Repeat 1-4 and note results numbers match and results are relevant 8 - Test a search with a ';' to ensure this patch isn't breaking searches
Created attachment 56069 [details] [review] Bug 17392 - opac/svc/overdrive_proxy is not plack safe This patch simply replaces the ';' in the param passed to OverDrive with '&' To test: 1 - Enable overdrive (requires an account) 2 - Perform an opac search 3 - Note the number of overdrive results reported 4 - Click the link to view the actualt overdrive results 5 - Note the result numbers don't match 6 - Apply patch 7 - Repeat 1-4 and note results numbers match and results are relevant 8 - Test a search with a ';' to ensure this patch isn't breaking searches Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Created attachment 56151 [details] [review] [PASSED QA] Bug 17392 - opac/svc/overdrive_proxy is not plack safe This patch simply replaces the ';' in the param passed to OverDrive with '&' To test: 1 - Enable overdrive (requires an account) 2 - Perform an opac search 3 - Note the number of overdrive results reported 4 - Click the link to view the actual overdrive results 5 - Note the result numbers don't match 6 - Apply patch 7 - Repeat 1-4 and note results numbers match and results are relevant 8 - Test a search with a ';' to ensure this patch isn't breaking searches Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Verified by reading code - couldn't verify using Overdrive.
Pushed to Master - Should be in the November 16.11 Release. Thanks!
Pushed in 16.05. Will be in 16.05.05.
Pushed to 3.22.x, will be in 3.22.12