diff options
author | Ollivier Robert <roberto@FreeBSD.org> | 2002-02-28 17:00:02 +0000 |
---|---|---|
committer | Ollivier Robert <roberto@FreeBSD.org> | 2002-02-28 17:00:02 +0000 |
commit | 015b4ea82da74ea0d2ac66b3be6e65530fb03385 (patch) | |
tree | 2326e6557155f776b88254becc76b6d7d0d03f13 /devel/subversion16 | |
parent | It's a template engine for PHP. (diff) |
Add a patch taken from dev@subversion archive to enable use of http_proxy
env. variable. That way, one can use subversion across a HTTP proxy.
This is a band-aid till the SVN group do it properly.
Approved by: Garrett Rooney <rooneg@electricjellyfish.net> (MAINTAINER)
Obtained from: dev@subversion.tigris.org mail archive
Diffstat (limited to 'devel/subversion16')
-rw-r--r-- | devel/subversion16/files/patch-subversion::libsvn_ra_dav::session.c | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/devel/subversion16/files/patch-subversion::libsvn_ra_dav::session.c b/devel/subversion16/files/patch-subversion::libsvn_ra_dav::session.c new file mode 100644 index 000000000000..446c02a538f4 --- /dev/null +++ b/devel/subversion16/files/patch-subversion::libsvn_ra_dav::session.c @@ -0,0 +1,46 @@ + + +=================================================================== +--- ./subversion/libsvn_ra_dav/.svn/text-base/session.c Wed Oct 17 11:34:54 2001 ++++ ./subversion/libsvn_ra_dav/session.c Wed Oct 17 15:30:15 2001 +@@ -103,6 +103,7 @@ + ne_session *sess, *sess2; + struct uri uri = { 0 }; + svn_ra_session_t *ras; ++ char *proxy; + + /* Sanity check the URI */ + if (uri_parse(repository, &uri, NULL) +@@ -121,6 +122,26 @@ + /* Create two neon session objects, and set their properties... */ + sess = ne_session_create(); + sess2 = ne_session_create(); ++ ++ /* Proxy setup must be done early */ ++ proxy = getenv("http_proxy"); ++ if (proxy != NULL) ++ { ++ struct uri proxy_uri = { 0 }; ++ struct uri proxy_uri_default = { port: 80 }; ++ if (uri_parse(proxy, &proxy_uri, &proxy_uri_default) ++ || uri.host == NULL) ++ { ++ return svn_error_create(SVN_ERR_RA_ILLEGAL_URL, 0, NULL, pool, ++ "illegal URL for proxy"); ++ } ++ if (ne_session_proxy(sess, proxy_uri.host, proxy_uri.port) ++ || ne_session_proxy(sess2, proxy_uri.host, proxy_uri.port)) ++ { ++ return svn_error_createf(SVN_ERR_RA_HOSTNAME_LOOKUP, 0, NULL, pool, ++ "Hostname not found: %s", proxy_uri.host); ++ } ++ } + + #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 + + |