CC: | "Schmoger, Daniel" <daniel.schmoger [...] sap.com>, "Andreev, Ivan" <ivan.andreev [...] sap.com>, "Voelkel, Robert" <robert.voelkel [...] sap.com> |
Subject: | Bug in Net::HTTP::Methods::my_readline , version 6.09 |
Date: | Wed, 29 Jun 2016 08:54:49 +0000 |
To: | "bug-Net-HTTP [...] rt.cpan.org" <bug-Net-HTTP [...] rt.cpan.org> |
From: | "Lakov, Martin" <martin.lakov [...] sap.com> |
Hello,
I would like to inform you about a problem related to the implementation of the following sub Net::HTTP::Methods::my_readline in version 6.09 of the module.
Currently the implementation of this sub is "greedy" - it tries to read all available bytes in the byte stream for the request, instead of stopping after a new line was found (which the implementation in 6.06 and 6.07 did).
This behavior results in the fact that when we have a continuous feed of data (e.g. downloading large binary file), all of the data is stored in memory and no handlers are notified until the entire payload of the request is received.
This can result in an unpredictable behavior (segmentation faults occurred sporadically) and "out-of-memory" errors, depending on the underlying hardware.
Best Regards,
Martin