You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2017/05/12 08:04:42 UTC

[18/19] httpcomponents-core git commit: Log that we loading the keystore and what we are serving where.

Log that we loading the keystore and what we are serving where.


Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/commit/f5ad120f
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/tree/f5ad120f
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-core/diff/f5ad120f

Branch: refs/heads/4.4.x
Commit: f5ad120f9793bbb4a2bf6e0da5995df7b90eed78
Parents: 75e1623
Author: Gary D. Gregory <gg...@apache.org>
Authored: Tue May 9 22:11:04 2017 +0000
Committer: Oleg Kalnichevski <ol...@apache.org>
Committed: Fri May 12 10:00:10 2017 +0200

----------------------------------------------------------------------
 .../examples/org/apache/http/examples/nio/NHttpFileServer.java    | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/httpcomponents-core/blob/f5ad120f/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpFileServer.java
----------------------------------------------------------------------
diff --git a/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpFileServer.java b/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpFileServer.java
index 56dba42..cbbe8a3 100644
--- a/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpFileServer.java
+++ b/httpcore-nio/src/examples/org/apache/http/examples/nio/NHttpFileServer.java
@@ -83,6 +83,7 @@ public class NHttpFileServer {
                 System.out.println("Keystore not found");
                 System.exit(1);
             }
+            System.out.println("Loading keystore " + url);
             sslContext = SSLContexts.custom()
                     .loadKeyMaterial(url, "nopassword".toCharArray(), "nopassword".toCharArray())
                     .build();
@@ -103,6 +104,8 @@ public class NHttpFileServer {
                 .create();
 
         server.start();
+        System.out.println("Serving " + docRoot + " on " + server.getEndpoint().getAddress()
+                + (sslContext == null ? "" : " with " + sslContext.getProvider() + " " + sslContext.getProtocol()));
         server.awaitTermination(Long.MAX_VALUE, TimeUnit.DAYS);
 
         Runtime.getRuntime().addShutdownHook(new Thread() {