Index: ChangeLog
===================================================================
--- ChangeLog	(revision 2104)
+++ ChangeLog	(working copy)
@@ -1,3 +1,11 @@
+2008-11-25  Dan Winship  <danw@gnome.org>
+
+	* configure.ac: require libsoup-gnome, for SoupProxyResolverGNOME
+
+	* daemon/gvfsbackendhttp.c (g_vfs_backend_http_init): add a
+	SoupProxyResolverGNOME to the sessions, to automatically handle
+	proxies.
+
 2008-11-18  Alexander Larsson  <alexl@redhat.com>
 
         * daemon/gvfsbackendsftp.c:
Index: daemon/gvfsbackendhttp.c
===================================================================
--- daemon/gvfsbackendhttp.c	(revision 2104)
+++ daemon/gvfsbackendhttp.c	(working copy)
@@ -33,7 +33,7 @@
 #include <glib/gi18n.h>
 #include <gio/gio.h>
 
-#include <libsoup/soup.h>
+#include <libsoup/soup-gnome.h>
 #include "gvfsbackendhttp.h"
 #include "gvfsjobopenforread.h"
 #include "gvfsjobread.h"
@@ -79,7 +79,8 @@ g_vfs_backend_http_finalize (GObject *ob
 static void
 g_vfs_backend_http_init (GVfsBackendHttp *backend)
 {
-   const char         *debug;
+  const char         *debug;
+  SoupSessionFeature *proxy_resolver;
 
   g_vfs_backend_set_user_visible (G_VFS_BACKEND (backend), FALSE);  
 
@@ -91,6 +92,12 @@ g_vfs_backend_http_init (GVfsBackendHttp
                                                                 "gvfs/" VERSION,
                                                                 NULL);
 
+  /* Proxy handling */
+  proxy_resolver = g_object_new (SOUP_TYPE_PROXY_RESOLVER_GNOME, NULL);
+  soup_session_add_feature (backend->session, proxy_resolver);
+  soup_session_add_feature (backend->session_async, proxy_resolver);
+  g_object_unref (proxy_resolver);
+
   /* Logging */
   debug = g_getenv ("GVFS_HTTP_DEBUG");
   if (debug)
@@ -107,8 +114,8 @@ g_vfs_backend_http_init (GVfsBackendHttp
         level = SOUP_LOGGER_LOG_MINIMAL;
 
       logger = soup_logger_new (level, DEBUG_MAX_BODY_SIZE);
-      soup_logger_attach (logger, backend->session);
-      soup_logger_attach (logger, backend->session_async);
+      soup_session_add_feature (backend->session, SOUP_SESSION_FEATURE (logger));
+      soup_session_add_feature (backend->session_async, SOUP_SESSION_FEATURE (logger));
       g_object_unref (logger);
     }
 
Index: configure.ac
===================================================================
--- configure.ac	(revision 2104)
+++ configure.ac	(working copy)
@@ -125,10 +125,10 @@ HTTP_CFLAGS=
 HTTP_LIBS=
 
 if test "x$enable_http" != "xno"; then
-  PKG_CHECK_EXISTS(libsoup-2.4 >= 2.23.91, msg_http=yes)
+  PKG_CHECK_EXISTS(libsoup-gnome-2.4 >= 2.25.1, msg_http=yes)
 
   if test "x$msg_http" == "xyes"; then
-    PKG_CHECK_MODULES(HTTP, libsoup-2.4 libxml-2.0)
+    PKG_CHECK_MODULES(HTTP, libsoup-gnome-2.4 libxml-2.0)
     AC_DEFINE(HAVE_HTTP, 1, [Define to 1 if http/dav is going to be built])
   fi
 fi
