]> git.evergreen-ils.org Git - working/OpenSRF.git/commit
LP#1717350: fix chunking messages sent from Perl services user/gmcharlt/lp1717350_fractional_characters_are_not_a_thing
authorGalen Charlton <gmc@equinoxinitiative.org>
Thu, 14 Sep 2017 21:36:40 +0000 (17:36 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Thu, 14 Sep 2017 21:38:28 +0000 (17:38 -0400)
commitae7ebb4f3ad2e33678e730304e181931e4a1cade
tree5c1603e8b7c41b055ec41985db6b9ed8e3877414
parentbe2b2645f7da0907366eb0c99b5d6c231c366b30
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>
src/perl/lib/OpenSRF/AppSession.pm