]> source.dussan.org Git - jgit.git/commit
Fix JGit CLI to follow native git's interpretation of http_proxy... 16/83216/2
authorChristian Halstrick <christian.halstrick@sap.com>
Fri, 14 Oct 2016 12:20:40 +0000 (14:20 +0200)
committerChristian Halstrick <christian.halstrick@sap.com>
Fri, 14 Oct 2016 13:14:21 +0000 (15:14 +0200)
commit293e8beaccafced255ccd354adab36de0257352f
tree7525a536c94a43eac187d453205e211646071c36
parentb8e3e194e3200adfb0c64a4d79b9bfbb0837b00c
Fix JGit CLI to follow native git's interpretation of http_proxy...

Native git (as many other tools) interprets the environment variables
http_proxy, HTTP_PROXY, ... in a specific way. "http_proxy" has to be
lowercase while "https_proxy" can be lowercase or uppercase (means:
"HTTPS_PROXY"). Lowercase has precedence. This can be looked up in
"ENVIRONMENT" section of [1]. Teach JGit CLI to behave similar.

Additionally teach JGit not to interpret the environment variables if
the java process was explicitly started with the system properties
telling JVM which proxy to use. A call like "http_proxy=proxy1 java
-Dhttp.proxyHost=proxy2 ..." should use proxy2 as proxy.

[1] https://curl.haxx.se/docs/manpage.html

Change-Id: I2ad78f209792bf8f1285cf2f8ada8ae0c28f8e5a
org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ProxyConfigTest.java [new file with mode: 0644]
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java