Author: markt Date: Mon May 11 12:57:12 2015 New Revision: 1678747 URL: http://svn.apache.org/r1678747 Log: Correctly return the buffer to the original state (was causing issues with the SSLLabs server test)
Modified: tomcat/trunk/java/org/apache/tomcat/util/net/SNIExtractor.java Modified: tomcat/trunk/java/org/apache/tomcat/util/net/SNIExtractor.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/SNIExtractor.java?rev=1678747&r1=1678746&r2=1678747&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/net/SNIExtractor.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/net/SNIExtractor.java Mon May 11 12:57:12 2015 @@ -52,6 +52,7 @@ public class SNIExtractor { // Buffer is in write mode at this point. Record the current position so // the buffer state can be restored at the end of this method. int pos = netInBuffer.position(); + int limit = netInBuffer.limit(); SNIResult result = SNIResult.NOT_PRESENT; String sniValue = null; try { @@ -114,7 +115,7 @@ public class SNIExtractor { this.result = result; this.sniValue = sniValue; // Whatever happens, return the buffer to its original state - netInBuffer.limit(netInBuffer.capacity()); + netInBuffer.limit(limit); netInBuffer.position(pos); } } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org