From: markt Date: Mon, 7 Apr 2008 22:47:54 +0000 (+0000) Subject: All of the issues I was seeing with mark/reset were due to states that resulted in... X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=05e66768504cdc004ff85cfbd1176ab949d8c407;p=tomcat7.0 All of the issues I was seeing with mark/reset were due to states that resulted in a call to CharChunk.flushBuffer(). I tried many different ways to fix it but by far the simplest was this patch that just increases the size of the CharChunk internal buffer when creating the mark sufficiently that flushBuffer() is never called. With this patch I can't break mark/reset with bug 44494's test case in single or multibyte mode. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@645722 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/catalina/connector/InputBuffer.java b/java/org/apache/catalina/connector/InputBuffer.java index 6bd484a38..f60dfc43a 100644 --- a/java/org/apache/catalina/connector/InputBuffer.java +++ b/java/org/apache/catalina/connector/InputBuffer.java @@ -457,11 +457,7 @@ public class InputBuffer extends Reader cb.setOffset(0); } } - int offset = readAheadLimit; - if (offset < size) { - offset = size; - } - cb.setLimit(cb.getStart() + offset); + cb.setLimit(cb.getStart() + readAheadLimit + size); markPos = cb.getStart(); }