You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Tobias Bocanegra (JIRA)" <ji...@apache.org> on 2013/11/25 23:26:35 UTC
[jira] [Created] (SLING-3256) Regression by SLING-3255:
StreamRendererServlet writes wrong output
Tobias Bocanegra created SLING-3256:
---------------------------------------
Summary: Regression by SLING-3255: StreamRendererServlet writes wrong output
Key: SLING-3256
URL: https://issues.apache.org/jira/browse/SLING-3256
Project: Sling
Issue Type: Bug
Components: Servlets
Affects Versions: Servlets Get 2.1.4
Reporter: Tobias Bocanegra
the changes introduced by SLING-3255 contained a bug, which produces wrong output.
on line 548, only {{read}} bytes should be written, not {{len}} :
{code}
543 while (position < end) {
544 int len = (int) Math.min(end - position, buffer.length);
545 int read = istream.read(buffer, 0, len);
546 if (read != -1) {
547 position += read;
548 ostream.write(buffer, 0, len);
549 } else {
550 break;
551 }
552 }
553 }
{code}
--
This message was sent by Atlassian JIRA
(v6.1#6144)