Blame SOURCES/use-https-and-fix-the-cache.patch

ca264f
From 6f67e61ff8f3beaf932914e690f5fb500bbc69cb Mon Sep 17 00:00:00 2001
ca264f
From: Jonas Danielsson <jonas@threetimestwo.org>
ca264f
Date: Wed, 17 Dec 2014 02:36:03 -0500
ca264f
Subject: [PATCH] forward, reverse: Use https and fix the cache
ca264f
ca264f
At the moment the cache for queries does not work. This is because
ca264f
we are using a query with 'http://' to look for cached contents.
ca264f
But when we are saving we are using 'https://' since that is what
ca264f
the nominatim server redirects us to.
ca264f
ca264f
Regardless of that, moving to 'https://' seems like a good thing.
ca264f
---
ca264f
 geocode-glib/geocode-forward.c | 4 ++--
ca264f
 geocode-glib/geocode-reverse.c | 2 +-
ca264f
 2 files changed, 3 insertions(+), 3 deletions(-)
ca264f
ca264f
diff --git a/geocode-glib/geocode-forward.c b/geocode-glib/geocode-forward.c
ca264f
index b7e3b56..c41c874 100644
ca264f
--- a/geocode-glib/geocode-forward.c
ca264f
+++ b/geocode-glib/geocode-forward.c
ca264f
@@ -490,7 +490,7 @@ get_search_query_for_params (GeocodeForward *forward,
ca264f
         if (location != NULL) {
ca264f
 	        /* Prepare the search term */
ca264f
                 search_term = soup_uri_encode (location, NULL);
ca264f
-                uri = g_strdup_printf ("http://nominatim.gnome.org/search?q=%s&limit=%u&bounded=%d&%s",
ca264f
+                uri = g_strdup_printf ("https://nominatim.gnome.org/search?q=%s&limit=%u&bounded=%d&%s",
ca264f
                                        search_term,
ca264f
                                        forward->priv->answer_count,
ca264f
                                        !!forward->priv->bounded,
ca264f
@@ -498,7 +498,7 @@ get_search_query_for_params (GeocodeForward *forward,
ca264f
                 g_free (search_term);
ca264f
                 g_free (location);
ca264f
         } else {
ca264f
-                uri = g_strdup_printf ("http://nominatim.gnome.org/search?limit=1&%s",
ca264f
+                uri = g_strdup_printf ("https://nominatim.gnome.org/search?limit=1&%s",
ca264f
                                        params);
ca264f
         }
ca264f
 	g_free (params);
ca264f
diff --git a/geocode-glib/geocode-reverse.c b/geocode-glib/geocode-reverse.c
ca264f
index 3f94478..aa70077 100644
ca264f
--- a/geocode-glib/geocode-reverse.c
ca264f
+++ b/geocode-glib/geocode-reverse.c
ca264f
@@ -373,7 +373,7 @@ get_resolve_query_for_params (GHashTable  *orig_ht)
ca264f
 	g_hash_table_destroy (ht);
ca264f
 	g_free (locale);
ca264f
 
ca264f
-	uri = g_strdup_printf ("http://nominatim.gnome.org/reverse?%s", params);
ca264f
+	uri = g_strdup_printf ("https://nominatim.gnome.org/reverse?%s", params);
ca264f
 	g_free (params);
ca264f
 
ca264f
 	ret = soup_message_new ("GET", uri);
ca264f
-- 
ca264f
2.4.3
ca264f