JBossWeb SVN: r2377 - branches/7.4.x/src/main/java/org/apache/coyote/http11.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2014-03-10 10:48:49 -0400 (Mon, 10 Mar 2014)
New Revision: 2377
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/InternalOutputBuffer.java
Log:
Port patch to the other connectors.
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-10 11:51:57 UTC (rev 2376)
+++ branches/7.4.x/src/main/java/org/apache/coyote/http11/InternalAprOutputBuffer.java 2014-03-10 14:48:49 UTC (rev 2377)
@@ -80,6 +80,9 @@
// Cause loading of HttpMessages
HttpMessages.getMessage(200);
+ // Cause loading of constants
+ boolean res = org.apache.coyote.Constants.USE_CUSTOM_STATUS_MSG_IN_HEADER;
+
}
Modified: branches/7.4.x/src/main/java/org/apache/coyote/http11/InternalOutputBuffer.java
===================================================================
--- branches/7.4.x/src/main/java/org/apache/coyote/http11/InternalOutputBuffer.java 2014-03-10 11:51:57 UTC (rev 2376)
+++ branches/7.4.x/src/main/java/org/apache/coyote/http11/InternalOutputBuffer.java 2014-03-10 14:48:49 UTC (rev 2377)
@@ -69,6 +69,9 @@
committed = false;
finished = false;
+ // Cause loading of constants
+ boolean res = org.apache.coyote.Constants.USE_CUSTOM_STATUS_MSG_IN_HEADER;
+
}
10 years, 1 month
JBossWeb SVN: r2376 - branches/7.4.x/src/main/java/org/apache/coyote/http11.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2014-03-10 07:51:57 -0400 (Mon, 10 Mar 2014)
New Revision: 2376
Modified:
branches/7.4.x/src/main/java/org/apache/coyote/http11/InternalNioOutputBuffer.java
Log:
BZ1073159: Preload constant.
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-05 14:58:51 UTC (rev 2375)
+++ branches/7.4.x/src/main/java/org/apache/coyote/http11/InternalNioOutputBuffer.java 2014-03-10 11:51:57 UTC (rev 2376)
@@ -176,6 +176,9 @@
// Cause loading of HttpMessages
HttpMessages.getMessage(200);
+ // Cause loading of constants
+ boolean res = org.apache.coyote.Constants.USE_CUSTOM_STATUS_MSG_IN_HEADER;
+
}
/*
10 years, 1 month
JBossWeb SVN: r2375 - branches/7.4.x/src/main/java/org/apache/tomcat/websocket.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2014-03-05 09:58:51 -0500 (Wed, 05 Mar 2014)
New Revision: 2375
Modified:
branches/7.4.x/src/main/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java
Log:
Port fix: possible NPE with batch.
Modified: branches/7.4.x/src/main/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java
===================================================================
--- branches/7.4.x/src/main/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java 2014-03-03 16:21:50 UTC (rev 2374)
+++ branches/7.4.x/src/main/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java 2014-03-05 14:58:51 UTC (rev 2375)
@@ -232,7 +232,9 @@
} else {
f2sh.get(timeout, TimeUnit.MILLISECONDS);
}
- payload.clear();
+ if (payload != null) {
+ payload.clear();
+ }
} catch (InterruptedException e) {
throw new IOException(e);
} catch (ExecutionException e) {
10 years, 2 months
JBossWeb SVN: r2374 - branches/7.4.x/src/main/java/org/apache/coyote/http11.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2014-03-03 11:21:50 -0500 (Mon, 03 Mar 2014)
New Revision: 2374
Modified:
branches/7.4.x/src/main/java/org/apache/coyote/http11/InternalNioInputBuffer.java
Log:
Remove bad code to handle exception thrown during blocking read.
Modified: branches/7.4.x/src/main/java/org/apache/coyote/http11/InternalNioInputBuffer.java
===================================================================
--- branches/7.4.x/src/main/java/org/apache/coyote/http11/InternalNioInputBuffer.java 2014-02-26 14:33:13 UTC (rev 2373)
+++ branches/7.4.x/src/main/java/org/apache/coyote/http11/InternalNioInputBuffer.java 2014-03-03 16:21:50 UTC (rev 2374)
@@ -446,7 +446,13 @@
} else {
// Prepare the internal input buffer for reading
prepare();
- nRead = blockingRead(readTimeout, unit);
+ try {
+ nRead = channel.readBytes(bbuf, readTimeout, unit);
+ } catch (Exception e) {
+ if (CoyoteLogger.HTTP_LOGGER.isDebugEnabled()) {
+ CoyoteLogger.HTTP_LOGGER.errorWithBlockingRead(e);
+ }
+ }
if (nRead > 0) {
bbuf.flip();
if (nRead > (buf.length - end)) {
@@ -463,6 +469,8 @@
throw new EOFException(MESSAGES.failedRead());
} else if (nRead == NioChannel.OP_STATUS_READ_TIMEOUT) {
throw new SocketTimeoutException(MESSAGES.failedRead());
+ } else if (nRead == 0) {
+ throw new EOFException(MESSAGES.failedRead());
}
}
return nRead;
@@ -484,36 +492,6 @@
}
/**
- * Close the channel
- */
- private void close(NioChannel channel) {
- endpoint.closeChannel(channel);
- }
-
- /**
- * Read a sequence of bytes in blocking mode from he current channel
- *
- * @param bb
- * @return the number of bytes read or -1 if the end of the stream was
- * reached
- */
- private int blockingRead(long timeout, TimeUnit unit) {
- int nr = 0;
- try {
- long readTimeout = timeout > 0 ? timeout : Integer.MAX_VALUE;
- nr = this.channel.readBytes(bbuf, readTimeout, unit);
- if (nr < 0) {
- close(channel);
- }
- } catch (Exception e) {
- if (CoyoteLogger.HTTP_LOGGER.isDebugEnabled()) {
- CoyoteLogger.HTTP_LOGGER.errorWithBlockingRead(e);
- }
- }
- return nr;
- }
-
- /**
* This class is an input buffer which will read its data from an input
* stream.
*/
10 years, 2 months