From: Pierre-Luc Beaudoin Date: Fri, 12 Jun 2009 03:46:39 +0000 (-0400) Subject: Fix Bug 584149: libchamplain should set the user agent on libsoup X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c9ad2026772de5d35eeefc67a6a8eed8ce8fa72d;p=libchamplain Fix Bug 584149: libchamplain should set the user agent on libsoup --- diff --git a/champlain/champlain-network-map-source.c b/champlain/champlain-network-map-source.c index 9591cd9..1d018a6 100644 --- a/champlain/champlain-network-map-source.c +++ b/champlain/champlain-network-map-source.c @@ -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),