tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1710179 - in /tomcat/trunk/java/org/apache/coyote/http2: Http2UpgradeHandler.java LocalStrings.properties
Date Fri, 23 Oct 2015 11:37:00 GMT
Author: markt
Date: Fri Oct 23 11:36:59 2015
New Revision: 1710179

URL: http://svn.apache.org/viewvc?rev=1710179&view=rev
Log:
More improvements to debug logging inspired by Chrome+NIO2 investigations

Modified:
    tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java
    tomcat/trunk/java/org/apache/coyote/http2/LocalStrings.properties

Modified: tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java?rev=1710179&r1=1710178&r2=1710179&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http2/Http2UpgradeHandler.java Fri Oct 23 11:36:59
2015
@@ -220,7 +220,11 @@ public class Http2UpgradeHandler extends
             socketWrapper.write(true, settings, 0, settings.length);
             socketWrapper.flush(true);
         } catch (IOException ioe) {
-            throw new ProtocolException(sm.getString("upgradeHandler.sendPrefaceFail"), ioe);
+            String msg = sm.getString("upgradeHandler.sendPrefaceFail", connectionId);
+            if (log.isDebugEnabled()) {
+                log.debug(msg);
+            }
+            throw new ProtocolException(msg, ioe);
         }
 
         // Make sure the client has sent a valid connection preface before we
@@ -228,8 +232,14 @@ public class Http2UpgradeHandler extends
         try {
             parser.readConnectionPreface();
         } catch (Http2Exception e) {
-            throw new ProtocolException(
-                    sm.getString("upgradeHandler.invalidPreface", connectionId));
+            String msg = sm.getString("upgradeHandler.invalidPreface", connectionId);
+            if (log.isDebugEnabled()) {
+                log.debug(msg);
+            }
+            throw new ProtocolException(msg);
+        }
+        if (log.isDebugEnabled()) {
+            log.debug(sm.getString("upgradeHandler.prefaceReceived", connectionId));
         }
 
         // Send a ping to get an idea of round trip time as early as possible

Modified: tomcat/trunk/java/org/apache/coyote/http2/LocalStrings.properties
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http2/LocalStrings.properties?rev=1710179&r1=1710178&r2=1710179&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http2/LocalStrings.properties (original)
+++ tomcat/trunk/java/org/apache/coyote/http2/LocalStrings.properties Fri Oct 23 11:36:59
2015
@@ -100,13 +100,14 @@ upgradeHandler.invalidPreface=Connection
 upgradeHandler.ioerror=Connection [{0}]
 upgradeHandler.noNewStreams=Connection [{0}], Stream [{1}], Stream ignored as no new streams
are permitted on this connection
 upgradeHandler.pause.entry=Connection [{0}] Pausing
+upgradeHandler.prefaceReceived=Connection [{0}], Connection preface received from client
 upgradeHandler.pingFailed=Connection [{0}] Failed to send ping to client
 upgradeHandler.pruneIncomplete=Connection [{0}] Failed to fully prune the connection because
streams were active / used in the priority tree. There are [{0}] too many streams
 upgradeHandler.pruneStart=Connection [{0}] Starting pruning of old streams. Limit is [{1}]
+ 10% and there are currently [{2}] streams.
 upgradeHandler.pruned=Connection [{0}] Pruned completed stream [{1}]
 upgradeHandler.prunedPriority=Connection [{0}] Pruned unused stream [{1}] that may have been
part of the priority tree
 upgradeHandler.rst.debug=Connection [{0}], Stream [{1}], Error [{2}], RST (closing stream)
-upgradeHandler.sendPrefaceFail=Failed to send preface to client
+upgradeHandler.sendPrefaceFail=Connection [{0}], Failed to send preface to client
 upgradeHandler.socketCloseFailed=Error closing socket
 upgradeHandler.stream.closed=Stream [{0}] has been closed for some time
 upgradeHandler.stream.even=A new remote stream ID of [{0}] was requested but all remote streams
must use odd identifiers



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message