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

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