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

Re: HTTP proxy support (issue #579)

From: Karl Fogel <kfogel_at_newton.ch.collab.net>
Date: 2002-01-10 17:55:38 CET

"Morris, Mitchell" <Mitchell.Morris@cingular.com> writes:
> 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.

Believe me, we'd *love* to have Observer status automatically granted
to anyone who requests it. Apparently, Tigris doesn't currently
support this. The other advantages of Tigris are compelling enough
that we can live with little bugaboos like this, though.

You shouldn't need any status (Observer or otherwise) to submit a
patch -- you should just be able to mail the list from any valid email
address. If you tried and it didn't work, please let us know.

Agree with you about the needless overhead on the feedback loop.

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

I know this is a trivial patch and easy to understand by reading, but
you might still want to

   1. Read the code contribution guidelines in the HACKING file, in
      particular about writing log messages.

   2. Generate patches against the head of the tree, not against the
      latest tarball. I don't know if session.c has changed since the
      last dist; I think it hasn't, so you're probably safe this time.

   3. Read the thread with subject

         "PATCH: using the env-var http_proxy"

      at http://subversion.tigris.org/servlets/SearchList?listName=dev
      and by the last couple of messages, you'll see what (I hope) is
      the current thinking on how to do this. In short, retrieving
      the proxy via getenv() is not portable; the proposed solution is
      to implement apr_get_http_proxy(), which on Unix platforms is
      free to call getenv("http_proxy"), among other tricks, and on
      Windows platforms can do something completely different.

      Writing that function would be pretty trivial -- would you like
      to come back with another patch that does things that way? We'd
      be forever grateful...

Thanks,
-Karl

> --- ./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

---------------------------------------------------------------------
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.