From a19725a63d8170eafa76dfc7f84f51118b11ffe0 2011-08-25 09:42:17
From: Satrajit Ghosh <satra@mit.edu>
Date: 2011-08-25 09:42:17
Subject: [PATCH] fix: display secure url with proper protocol

---

diff --git a/IPython/frontend/html/notebook/notebookapp.py b/IPython/frontend/html/notebook/notebookapp.py
index 6a9e379..759a277 100644
--- a/IPython/frontend/html/notebook/notebookapp.py
+++ b/IPython/frontend/html/notebook/notebookapp.py
@@ -263,7 +263,12 @@ class IPythonNotebookApp(BaseIPythonApplication):
 
     def start(self):
         ip = self.ip if self.ip else '[all ip addresses on your system]'
-        self.log.info("The IPython Notebook is running at: http://%s:%i" % (ip, self.port))
+        proto = 'http'
+        if self.certfile:
+            proto = 'https'
+        self.log.info("The IPython Notebook is running at: %s://%s:%i" % (proto,
+                                                                          ip,
+                                                                          self.port))
         ioloop.IOLoop.instance().start()
 
 #-----------------------------------------------------------------------------