Author: remy.maucherat(a)jboss.com
Date: 2014-10-06 10:51:59 -0400 (Mon, 06 Oct 2014)
New Revision: 2516
Modified:
branches/7.5.x/src/main/java/org/apache/tomcat/websocket/WsWebSocketContainer.java
Log:
Port patch for a fragmentation issue.
Modified:
branches/7.5.x/src/main/java/org/apache/tomcat/websocket/WsWebSocketContainer.java
===================================================================
---
branches/7.5.x/src/main/java/org/apache/tomcat/websocket/WsWebSocketContainer.java 2014-10-06
14:51:07 UTC (rev 2515)
+++
branches/7.5.x/src/main/java/org/apache/tomcat/websocket/WsWebSocketContainer.java 2014-10-06
14:51:59 UTC (rev 2516)
@@ -548,6 +548,9 @@
boolean readHeaders = false;
String line = null;
while (!readHeaders) {
+ // On entering loop buffer will be empty and at the start of a new
+ // loop the buffer will have been fully read.
+ response.clear();
// Blocking read
Future<Integer> read = channel.read(response);
Integer bytesRead = read.get(timeout, TimeUnit.MILLISECONDS);
Show replies by date