]> git.evergreen-ils.org Git - OpenSRF.git/commit
LP#1717350: fix chunking messages sent from Perl services
authorGalen Charlton <gmc@equinoxinitiative.org>
Thu, 14 Sep 2017 21:36:40 +0000 (17:36 -0400)
committerJason Stephenson <jason@sigio.com>
Fri, 15 Sep 2017 00:31:05 +0000 (20:31 -0400)
commite7eee4bd383797c3cf7f99ec4da1b9bdcf4c94e0
tree4cdb3c4ce4a293b4f51667788cf30199665ce84b
parent6a8a4c696d21598e5198bcefcb753cf9e3b63646
LP#1717350: fix chunking messages sent from Perl services

The chunk size adjustments introduced by the patches for bug 1709710
could result in calculating non-integral chunk sizes for Perl services.
This in turn led to fractional offsets and lengths being passed to
Perl's substr() function; rounding in turn can lead to characters
in the response getting silently dropped, which in turn broke
parsing the reconstituted response.

To test
-------
The problem can be reproduced by invoking

  open-ils.storage open-ils.storage.actor.org_unit.descendants.atomic 1, 0

in Evergreen databases with org unit trees large enough that the
response gets chunked.

Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Signed-off-by: Jason Stephenson <jason@sigio.com>
src/perl/lib/OpenSRF/AppSession.pm