]> err.no Git - libchamplain/commitdiff
Fix Bug 584149: libchamplain should set the user agent on libsoup
authorPierre-Luc Beaudoin <pierre-luc@pierlux.com>
Fri, 12 Jun 2009 03:46:39 +0000 (23:46 -0400)
committerPierre-Luc Beaudoin <pierre-luc@pierlux.com>
Fri, 12 Jun 2009 03:46:39 +0000 (23:46 -0400)
champlain/champlain-network-map-source.c

index 9591cd97147583b2fb8a9d54f78f36e73f357125..1d018a6070f8111a5f49462a20852a2cdc1d930a 100644 (file)
@@ -599,12 +599,16 @@ fill_tile (ChamplainMapSource *map_source,
       g_object_ref (tile);
 
       if (!soup_session)
-        soup_session = soup_session_async_new_with_options ("proxy-uri",
-            soup_uri_new (priv->proxy_uri),
+        {
+          soup_session = soup_session_async_new_with_options ("proxy-uri",
+                soup_uri_new (priv->proxy_uri),
 #ifdef HAVE_LIBSOUP_GNOME
-            SOUP_SESSION_ADD_FEATURE_BY_TYPE, SOUP_TYPE_PROXY_RESOLVER_GNOME,
+              SOUP_SESSION_ADD_FEATURE_BY_TYPE, SOUP_TYPE_PROXY_RESOLVER_GNOME,
 #endif
-            NULL);
+              NULL);
+          g_object_set (G_OBJECT (soup_session), "user-agent", "libchamplain/"
+              CHAMPLAIN_VERSION_S, NULL);
+        }
 
       uri = champlain_network_map_source_get_tile_uri (source,
                champlain_tile_get_x (tile), champlain_tile_get_y (tile),