From e171b8130ecc4b51bd06c0b7178e1b2c55f63c0c Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Thu, 4 Nov 2010 11:18:22 +0100 Subject: [PATCH] Use HTTPS by default Signed-off-by: Julien Danjou --- google-weather.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/google-weather.el b/google-weather.el index 329937e..be09e34 100644 --- a/google-weather.el +++ b/google-weather.el @@ -38,8 +38,12 @@ "Google Weather." :group 'comm) +(defcustom google-weather-use-https t + "Default protocol to use to access the Google Weather API." + :group 'google-weather) + (defconst google-weather-url - "http://www.google.com/ig/api" + "www.google.com/ig/api" "URL of the Google Weather API.") (defconst google-weather-image-url @@ -100,7 +104,7 @@ to 0 force a cache renewal." (defun google-weather-build-url (location &optional language) "Build URL to retrieve weather for LOCATION in LANGUAGE." - (concat google-weather-url "?weather=" (url-hexify-string location) + (concat "http" (when google-weather-use-https "s") "://" google-weather-url "?weather=" (url-hexify-string location) (when language (concat "&hl=" language)))) -- 2.11.4.GIT