From 847d4a0d3e5b5768c283938dee130ef10f9b044f Mon Sep 17 00:00:00 2001 From: John Miller Date: Wed, 30 Mar 2016 21:32:14 -0500 Subject: [PATCH] closes #81 This works by detecting if 'https:' appears in the url-or-port string, which will be the case if you call `ein:notebooklist-open` using https: + url + port. Note also that on windows, at least, I get SSL errors when using curl as request backend. Using url-retrieve eliminates the errors and SSL access works as advertised. --- lisp/ein-kernel.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/ein-kernel.el b/lisp/ein-kernel.el index 4aa58d9..8550609 100644 --- a/lisp/ein-kernel.el +++ b/lisp/ein-kernel.el @@ -146,7 +146,6 @@ (ein:url (ein:$kernel-url-or-port kernel) "api/sessions") :type "POST" - :data (json-encode `(("notebook" . (("name" . ,notebook-id) ("path" . ,path))))) @@ -207,7 +206,10 @@ (defun ein:kernel--ws-url (url-or-port &optional securep) "Use `ein:$kernel-url-or-port' if BASE_URL is an empty string. See: https://github.com/ipython/ipython/pull/3307" - (let ((protocol (if securep "wss" "ws"))) + (let ((protocol (if (or securep + (string-match "^https://" url-or-port)) + "wss" + "ws"))) (if (integerp url-or-port) (format "%s://127.0.0.1:%s" protocol url-or-port) (let* ((url (if (string-match "^https?://" url-or-port)