You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2015/01/08 14:11:20 UTC
svn commit: r1650284 - in /tomcat/trunk:
java/org/apache/coyote/http11/Http11OutputBuffer.java
test/org/apache/coyote/http11/filters/TesterOutputBuffer.java
Author: markt
Date: Thu Jan 8 13:11:19 2015
New Revision: 1650284
URL: http://svn.apache.org/r1650284
Log:
Simplify - call socketWrapper.write() directly
Modified:
tomcat/trunk/java/org/apache/coyote/http11/Http11OutputBuffer.java
tomcat/trunk/test/org/apache/coyote/http11/filters/TesterOutputBuffer.java
Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11OutputBuffer.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11OutputBuffer.java?rev=1650284&r1=1650283&r2=1650284&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/Http11OutputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11OutputBuffer.java Thu Jan 8 13:11:19 2015
@@ -350,7 +350,7 @@ public class Http11OutputBuffer<S> imple
public void sendAck() throws IOException {
if (!committed) {
- addToBB(Constants.ACK_BYTES, 0, Constants.ACK_BYTES.length);
+ socketWrapper.write(isBlocking(), Constants.ACK_BYTES, 0, Constants.ACK_BYTES.length);
if (flushBuffer(true)) {
throw new IOException(sm.getString("iob.failedwrite.ack"));
}
@@ -370,7 +370,7 @@ public class Http11OutputBuffer<S> imple
if (pos > 0) {
// Sending the response header buffer
- addToBB(headerBuffer, 0, pos);
+ socketWrapper.write(isBlocking(), headerBuffer, 0, pos);
}
}
@@ -587,11 +587,6 @@ public class Http11OutputBuffer<S> imple
}
- protected void addToBB(byte[] buf, int offset, int length) throws IOException {
- socketWrapper.write(isBlocking(), buf, offset, length);
- }
-
-
//------------------------------------------------------ Non-blocking writes
protected void registerWriteInterest() {
@@ -668,7 +663,7 @@ public class Http11OutputBuffer<S> imple
int len = chunk.getLength();
int start = chunk.getStart();
byte[] b = chunk.getBuffer();
- addToBB(b, start, len);
+ socketWrapper.write(isBlocking(), b, start, len);
byteCount += len;
return len;
}
Modified: tomcat/trunk/test/org/apache/coyote/http11/filters/TesterOutputBuffer.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/coyote/http11/filters/TesterOutputBuffer.java?rev=1650284&r1=1650283&r2=1650284&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/coyote/http11/filters/TesterOutputBuffer.java (original)
+++ tomcat/trunk/test/org/apache/coyote/http11/filters/TesterOutputBuffer.java Thu Jan 8 13:11:19 2015
@@ -94,13 +94,6 @@ public class TesterOutputBuffer extends
}
- @Override
- protected void addToBB(byte[] buf, int offset, int length)
- throws IOException {
- // NO-OP: Unused
- }
-
-
/*
* Expose data written for use by unit tests.
*/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org