From c6f03ed03d68e52e8b18011d2c57959532b45fb5 Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Thu, 11 Dec 2014 16:57:33 +0100 Subject: [PATCH] Fix a problem in url.el without GnuTLS Fixes: debbugs:19346 * lisp/url/url-http.el (url-http-parse-headers): Check that `gnutls-available-p' is defined. --- lisp/url/ChangeLog | 5 +++++ lisp/url/url-http.el | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index 690f6991910..8ff78ee5b2e 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog @@ -1,3 +1,8 @@ +2014-12-11 Lars Magne Ingebrigtsen + + * url-http.el (url-http-parse-headers): Check that + `gnutls-available-p' is defined (bug#19346). + 2014-12-09 Lars Magne Ingebrigtsen * url-http.el (url-http-parse-headers): Pass the GnuTLS status of diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el index 34d325acf56..33e333d8e8c 100644 --- a/lisp/url/url-http.el +++ b/lisp/url/url-http.el @@ -495,7 +495,8 @@ should be shown to the user." (url-port url-current-object) url-http-process) ;; Pass the https certificate on to the caller. - (when (gnutls-available-p) + (when (and (fboundp 'gnutls-available-p) + (gnutls-available-p)) (let ((status (gnutls-peer-status url-http-process))) (when (or status (plist-get (car url-callback-arguments) :peer)) -- 2.39.2