LP 1444130: Add max_chunk_size guards to Holds.pm.
authorJason Stephenson <jstephenson@mvlc.org>
Tue, 14 Apr 2015 14:43:49 +0000 (10:43 -0400)
committerBill Erickson <berickxx@gmail.com>
Mon, 27 Apr 2015 15:14:32 +0000 (11:14 -0400)
commit4903c6ece24717269d8c37c44b48732fcde3db69
tree44eb8428fc210fcd0026868b6e4d81def8a15bb6
parent20f6442dea10e0df0ce4c5bd67f1fe0128176da2
LP 1444130: Add max_chunk_size guards to Holds.pm.

Web staff client fixes introduced a bug in using the Clear
Holds Shelf checkin modifier.  Commit 4ccbf980 added calls
to max_chunk_size on the client to use chunked responses for
better feedback during long operations.  Thise works just
fine when a regular OpenSRF AppRequest is used, but leads to
a network error when AppSubrequest is used, as apparently the
xul client does with the Clear Holds Shelf checkin modifier.

This commit adds code to check if the client object can do
the max_chunk_size call when the max_chunk_size call is
made.  This will prevent the network errors in cases where
the client is an AppSubrequest object and will still use
chunked responses when the client is capable of doing it.

Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm