Bug 11369: fix issue that can cause staff client searches to stop working
authorOlli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>
Wed, 11 Dec 2013 12:28:53 +0000 (14:28 +0200)
committerGalen Charlton <gmc@esilibrary.com>
Fri, 2 May 2014 23:17:04 +0000 (23:17 +0000)
commit0cada7a323db7f9871b67a07e3343642543b64e0
treef4af9b6157d557c381e081443640378e367da402
parent35bec75d66637bd3c4cff499ed7fb534b8d09f35
Bug 11369: fix issue that can cause staff client searches to stop working

This patch fixes an issue where too many search cursor cookies overflow
the HTTP-header size after making multiple searches in the staff client.

To replicate this issue, make multiple searches in catalogue/search.pl.
50+ Should be enough to cause the HTTP-request header to overgrow.
One can verify this issue by observing the searchCookie growth in
browser's stored cookies.

-------------
- TEST PLAN -
-------------

Keep making searches.
One should never have more than 10 searchCookies. Browser might display
only 9, because for some reason the newest js-generated cookie is not
included in Firefox's cookies listing.

------------
- DRAWBACK -
------------

Removing these cookies disables the search cursor for traversing search
results (next/previous) for the removed cookie. This maybe be problematic
in some cases,
(for ex when multiple search tabs need to be open and they need to be
 traversed)
One easy solution is to grow the amount of stored searchCookies from 10 to
20, but 10 is chosen so there will be plenty of room for other cookies as
well.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
catalogue/search.pl
koha-tmpl/intranet-tmpl/js/browser.js