[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

HTTP proxy support (issue #579)

From: Morris, Mitchell <Mitchell.Morris_at_cingular.com>
Date: 2002-01-10 17:37:06 CET

Nothing like making it easy for somebody to submit a patch, eh? Tigris login
required, plus a round trip to a human asking for permission to be an
Observer just so you can submit a bug and/or patch? I suspect that the
feedback loop might be somewhat throttled as a result.

Here is a patch against the bootstrap tarball that will successfully fetch
the full codebase through an HTTP proxy service. Hope this helps.

--- ./subversion/libsvn_ra_dav/session.c.orig Thu Jan 10 11:16:17 2002
+++ ./subversion/libsvn_ra_dav/session.c Thu Jan 10 11:10:26 2002
@@ -99,6 +99,7 @@
   ne_session *sess, *sess2;
   struct uri uri = { 0 };
   svn_ra_session_t *ras;
+ const char* proxy;

   /* Sanity check the URI */
   if (uri_parse(repository, &uri, NULL)
@@ -119,6 +120,21 @@
   /* Create two neon session objects, and set their properties... */
   sess = ne_session_create();
   sess2 = ne_session_create();
+
+ /* Proxy support? */
+ proxy = getenv("http_proxy");
+ if(proxy) {
+ struct uri proxy_uri;
+ if(uri_parse(proxy, &proxy_uri, NULL)) {
+ uri_free(&uri);
+ uri_free(&proxy_uri);
+ return svn_error_create(SVN_ERR_RA_ILLEGAL_URL, 0, NULL, pool,
+ "illegal URL for proxy");
+ }
+ ne_session_proxy(sess, proxy_uri.host, proxy_uri.port);
+ ne_session_proxy(sess2, proxy_uri.host, proxy_uri.port);
+ uri_free(&proxy_uri);
+ }

 #if 0
   /* #### enable this block for debugging output on stderr. */

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:55 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.