Blame SOURCES/0001-GWeatherWeather-Always-set-a-user-agent-when-doing-q.patch

7f8f23
From 42c4136039af5bfb4cb0d351131994ea57577d7f Mon Sep 17 00:00:00 2001
7f8f23
From: Bastien Nocera <hadess@hadess.net>
7f8f23
Date: Mon, 26 Aug 2019 14:55:12 +0300
7f8f23
Subject: [PATCH 1/7] GWeatherWeather: Always set a user-agent when doing
7f8f23
 queries
7f8f23
7f8f23
This should fix IWIN queries not working (403) because it didn't
7f8f23
appreciate the lack of user-agent.
7f8f23
---
7f8f23
 libgweather/gweather-weather.c | 2 ++
7f8f23
 meson.build                    | 1 +
7f8f23
 2 files changed, 3 insertions(+)
7f8f23
7f8f23
diff --git a/libgweather/gweather-weather.c b/libgweather/gweather-weather.c
7f8f23
index 571a3e0b..62543169 100644
7f8f23
--- a/libgweather/gweather-weather.c
7f8f23
+++ b/libgweather/gweather-weather.c
7f8f23
@@ -595,6 +595,8 @@ ref_session (void)
7f8f23
 	return g_object_ref (session);
7f8f23
 
7f8f23
     session = soup_session_new ();
7f8f23
+    g_object_set (G_OBJECT (session), SOUP_SESSION_USER_AGENT,
7f8f23
+                  "libgweather/" LIBGWEATHER_VERSION " (+https://gitlab.gnome.org/GNOME/libgweather/) ", NULL);
7f8f23
 
7f8f23
     cache = get_cache ();
7f8f23
     if (cache != NULL) {
7f8f23
diff --git a/meson.build b/meson.build
7f8f23
index 67261ad6..43490631 100644
7f8f23
--- a/meson.build
7f8f23
+++ b/meson.build
7f8f23
@@ -56,6 +56,7 @@ config_h.set_quoted('LOCALEDIR', join_paths(datadir, 'locale'))
7f8f23
 config_h.set_quoted('GNOMELOCALEDIR', join_paths(datadir, 'locale'))
7f8f23
 config_h.set_quoted('G_LOG_DOMAIN', 'GWeather')
7f8f23
 config_h.set_quoted('GWEATHER_XML_LOCATION_DIR', pkgdatadir)
7f8f23
+config_h.set_quoted('LIBGWEATHER_VERSION', meson.project_version())
7f8f23
 
7f8f23
 if c_compiler.has_member('struct tm', 'tm_gmtoff', prefix: '#include <time.h>')
7f8f23
   config_h.set('HAVE_TM_TM_GMOFF', 1)
7f8f23
-- 
7f8f23
2.30.2
7f8f23