https://issues.apache.org/bugzilla/show_bug.cgi?id=57509
Shelson Ferrari <supo...@vitplay.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED |--- --- Comment #7 from Shelson Ferrari <supo...@vitplay.com> --- - 4 bytes added is the correct fixe ? The method sendHeader --> write(name); headerBuffer[pos++] = Constants.COLON; headerBuffer[pos++] = Constants.SP; write(value); headerBuffer[pos++] = Constants.CR; headerBuffer[pos++] = Constants.LF; call the method write(MessageBytes mb) 2 times and at the end of this method, call the method write(mb.getByteChunk() this method call checkLengthBeforeWrite(length) In the first call write(name) --> this block that increments 2 positions is not called headerBuffer[pos++] = Constants.COLON; headerBuffer[pos++] = Constants.SP; The class AbstractHttp11Processor method private void prepareResponse() call the class AOB --> int size = headers.size(); for (int i = 0; i < size; i++) { getOutputBuffer().sendHeader(headers.getName(i), headers.getValue(i)); } getOutputBuffer().endHeaders(); in other words, I believe: the method checkLengthBeforeWrite in the first call if (pos + length > headerBuffer.length) the method checkLengthBeforeWrite in the second call if (pos + length + 2 > headerBuffer.length) and if have a third scan after getOutputBuffer().endHeaders() - there is no such verification - and also would not make sense if (pos + length + 4 > headerBuffer.length) and would be after getOutputBuffer().endHeaders() Please check. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org