Ensure correct cycling if input filters
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 25 Jan 2011 17:15:33 +0000 (17:15 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 25 Jan 2011 17:15:33 +0000 (17:15 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1063364 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/coyote/http11/InternalNioInputBuffer.java
webapps/docs/changelog.xml

index 8ed5ab3..a1a07ae 100644 (file)
@@ -144,11 +144,12 @@ public class InternalNioInputBuffer extends AbstractInputBuffer {
      */
     @Override
     public void recycle() {
-        super.recycle();
         // Recycle filters
         for (int i = 0; i <= lastActiveFilter; i++) {
             activeFilters[i].recycle();
         }
+        // This must be after filters since it resets the lastFilterIndex
+        super.recycle();
         socket = null;
         headerParsePos = HeaderParsePosition.HEADER_START;
         parsingRequestLine = true;
index d72c9e9..0b9b7c9 100644 (file)
         Prevent possible thread exhaustion if a Comet timeout event takes a
         while to complete. (markt)
       </fix>
+      <fix>
+        Prvent multiple Comet END events if the CometServlet calls
+        <code>event.close()</code> during an END event. (markt) 
+      </fix>
+      <fix>
+        Ensure correct recycling of NIO input filters when processing Comet
+        events. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Jasper">
         for explicit additional arguments for the executable. Those were
         broken when implementing fix for bug <bug>49657</bug>. (kkolinko)
       </fix>
-      <fix>
-        Prvent multiple Comet END events if the CometServlet calls
-        <code>event.close()</code> during an END event. (markt) 
-      </fix>
     </changelog>
   </subsection>
 </section>