Author: remy.maucherat(a)jboss.com
Date: 2014-04-01 10:00:05 -0400 (Tue, 01 Apr 2014)
New Revision: 2398
Modified:
branches/7.4.x/src/main/java/org/apache/coyote/http11/InternalAprOutputBuffer.java
branches/7.4.x/src/main/java/org/apache/coyote/http11/InternalNioOutputBuffer.java
Log:
GTNPORTAL-3435: Clear the buffer since its state should be the same as the other buffer,
but no need to clear it on recycle.
Modified:
branches/7.4.x/src/main/java/org/apache/coyote/http11/InternalAprOutputBuffer.java
===================================================================
---
branches/7.4.x/src/main/java/org/apache/coyote/http11/InternalAprOutputBuffer.java 2014-03-24
09:19:51 UTC (rev 2397)
+++
branches/7.4.x/src/main/java/org/apache/coyote/http11/InternalAprOutputBuffer.java 2014-04-01
14:00:05 UTC (rev 2398)
@@ -320,7 +320,6 @@
// Recycle Request object
response.recycle();
- bbuf.clear();
socket = 0;
pos = 0;
@@ -570,6 +569,7 @@
if (pos > 0) {
// Sending the response header buffer
+ bbuf.clear();
bbuf.put(buf, 0, pos);
}
Modified:
branches/7.4.x/src/main/java/org/apache/coyote/http11/InternalNioOutputBuffer.java
===================================================================
---
branches/7.4.x/src/main/java/org/apache/coyote/http11/InternalNioOutputBuffer.java 2014-03-24
09:19:51 UTC (rev 2397)
+++
branches/7.4.x/src/main/java/org/apache/coyote/http11/InternalNioOutputBuffer.java 2014-04-01
14:00:05 UTC (rev 2398)
@@ -359,8 +359,7 @@
}
}
response.setLastWrite(res);
- // bbuf.clear();
- clearBuffer();
+ bbuf.clear();
if (res < 0) {
throw new IOException(MESSAGES.failedWrite());
@@ -467,12 +466,6 @@
flushBuffer();
}
- /**
- *
- */
- protected void clearBuffer() {
- this.bbuf.clear();
- }
/**
* Recycle this object
@@ -481,7 +474,6 @@
channel = null;
// Recycle Request object
response.recycle();
- this.clearBuffer();
pos = 0;
lastActiveFilter = -1;
committed = false;
@@ -666,6 +658,7 @@
if (pos > 0) {
// Sending the response header buffer
+ bbuf.clear();
bbuf.put(buf, 0, pos);
}
}
Show replies by date