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/05/11 14:57:13 UTC

svn commit: r1678747 - /tomcat/trunk/java/org/apache/tomcat/util/net/SNIExtractor.java

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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org