Author: remy.maucherat(a)jboss.com
Date: 2008-03-05 13:52:53 -0500 (Wed, 05 Mar 2008)
New Revision: 474
Modified:
trunk/java/org/apache/coyote/http11/InternalAprOutputBuffer.java
trunk/java/org/apache/coyote/http11/LocalStrings.properties
Log:
- String cleanup.
Modified: trunk/java/org/apache/coyote/http11/InternalAprOutputBuffer.java
===================================================================
--- trunk/java/org/apache/coyote/http11/InternalAprOutputBuffer.java 2008-03-05 18:32:31
UTC (rev 473)
+++ trunk/java/org/apache/coyote/http11/InternalAprOutputBuffer.java 2008-03-05 18:52:53
UTC (rev 474)
@@ -412,7 +412,7 @@
if (!committed) {
if (Socket.send(socket, Constants.ACK_BYTES, 0, Constants.ACK_BYTES.length)
< 0)
- throw new IOException(sm.getString("iib.failedwrite"));
+ throw new IOException(sm.getString("oob.failedwrite"));
}
}
@@ -547,10 +547,10 @@
}
- // FIXME: If non blocking (comet) and there are leftover bytes,
+ // If non blocking (comet) and there are leftover bytes,
// and lastWrite was 0 -> error
if (leftover.getLength() > 0 &&
!(Http11AprProcessor.containerThread.get() == Boolean.TRUE)) {
- throw new IOException("Backlog");
+ throw new IOException(sm.getString("oob.backlog"));
}
if (lastActiveFilter == -1)
@@ -739,7 +739,7 @@
}
}
if (res < 0) {
- throw new IOException("Error");
+ throw new IOException(sm.getString("oob.failedwrite"));
}
//System.out.println("Flushed leftover " + res);
response.setLastWrite(res);
@@ -774,7 +774,7 @@
}
}
if (res < 0) {
- throw new IOException("Error");
+ throw new IOException(sm.getString("oob.failedwrite"));
}
response.setLastWrite(res);
if (pos < end) {
@@ -801,9 +801,9 @@
int res = 0;
- // If there are still leftover bytes here, there's a problem:
+ // If there are still leftover bytes here, this means the user did a direct
flush:
// - If the call is asynchronous, throw an exception
- // - If the call is synchronous, make a regular blocking write to flush the data
+ // - If the call is synchronous, make regular blocking writes to flush the data
if (leftover.getLength() > 0) {
//System.out.println("Leftovers present");
if (Http11AprProcessor.containerThread.get() == Boolean.TRUE) {
@@ -819,7 +819,7 @@
bbuf.clear();
Socket.timeoutSet(socket, 0);
} else {
- throw new IOException("Backlog");
+ throw new IOException(sm.getString("oob.backlog"));
}
}
@@ -867,7 +867,7 @@
response.setLastWrite(res);
bbuf.clear();
if (res < 0) {
- throw new IOException("Error");
+ throw new IOException(sm.getString("oob.failedwrite"));
}
}
Modified: trunk/java/org/apache/coyote/http11/LocalStrings.properties
===================================================================
--- trunk/java/org/apache/coyote/http11/LocalStrings.properties 2008-03-05 18:32:31 UTC
(rev 473)
+++ trunk/java/org/apache/coyote/http11/LocalStrings.properties 2008-03-05 18:52:53 UTC
(rev 474)
@@ -49,3 +49,10 @@
iib.eof.error=Unexpected EOF read on the socket
iib.requestheadertoolarge.error=Request header is too large
+#
+# InternalOutputBuffer
+#
+
+oob.failedwrite=Write failure
+oob.backlog=Backlog is present
+
Show replies by date