diff options
author | Dan Winship <danw@gnome.org> | 2012-04-24 21:27:21 -0400 |
---|---|---|
committer | Dan Winship <danw@gnome.org> | 2012-04-28 13:18:11 -0400 |
commit | 3765e7589202a1f3e3fa5ea192bc680c3f36b7e3 (patch) | |
tree | 0c4653a00952f2d37df540f301d6b6318975c23c /tests | |
parent | a4910d0ca8f5034d75e35dd69059332f01a64ac0 (diff) | |
download | libsoup-3765e7589202a1f3e3fa5ea192bc680c3f36b7e3.tar.gz libsoup-3765e7589202a1f3e3fa5ea192bc680c3f36b7e3.tar.bz2 libsoup-3765e7589202a1f3e3fa5ea192bc680c3f36b7e3.zip |
tests/get: use GProxyResolverDefault
Diffstat (limited to 'tests')
-rw-r--r-- | tests/get.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/tests/get.c b/tests/get.c index 55dd7353..d3b6eacb 100644 --- a/tests/get.c +++ b/tests/get.c @@ -16,11 +16,7 @@ #include <sys/stat.h> #include <unistd.h> -#ifdef HAVE_GNOME -#include <libsoup/soup-gnome.h> -#else #include <libsoup/soup.h> -#endif static SoupSession *session; static GMainLoop *loop; @@ -169,9 +165,6 @@ main (int argc, char **argv) if (synchronous) { session = soup_session_sync_new_with_options ( SOUP_SESSION_SSL_CA_FILE, cafile, -#ifdef HAVE_GNOME - SOUP_SESSION_ADD_FEATURE_BY_TYPE, SOUP_TYPE_GNOME_FEATURES_2_26, -#endif SOUP_SESSION_ADD_FEATURE_BY_TYPE, SOUP_TYPE_CONTENT_DECODER, SOUP_SESSION_ADD_FEATURE_BY_TYPE, SOUP_TYPE_COOKIE_JAR, SOUP_SESSION_USER_AGENT, "get ", @@ -181,9 +174,6 @@ main (int argc, char **argv) } else { session = soup_session_async_new_with_options ( SOUP_SESSION_SSL_CA_FILE, cafile, -#ifdef HAVE_GNOME - SOUP_SESSION_ADD_FEATURE_BY_TYPE, SOUP_TYPE_GNOME_FEATURES_2_26, -#endif SOUP_SESSION_ADD_FEATURE_BY_TYPE, SOUP_TYPE_CONTENT_DECODER, SOUP_SESSION_ADD_FEATURE_BY_TYPE, SOUP_TYPE_COOKIE_JAR, SOUP_SESSION_USER_AGENT, "get ", @@ -192,15 +182,12 @@ main (int argc, char **argv) NULL); } - /* Need to do this after creating the session, since adding - * SOUP_TYPE_GNOME_FEATURE_2_26 will add a proxy resolver, thereby - * bashing over the manually-set proxy. - */ if (proxy) { g_object_set (G_OBJECT (session), SOUP_SESSION_PROXY_URI, proxy, NULL); - } + } else + soup_session_add_feature_by_type (session, SOUP_TYPE_PROXY_RESOLVER_DEFAULT); if (!synchronous) loop = g_main_loop_new (NULL, TRUE); |