Mercurial > hg > truffle
comparison mxtool/URLConnectionDownload.java @ 5017:0b781cdb0cfb
Use lower case http_proxy because this is the default environment variable on Linux
author | Christian Wimmer <Christian.Wimmer@Oracle.com> |
---|---|
date | Fri, 02 Mar 2012 09:23:18 -0800 |
parents | 148fa38782e8 |
children | db072eec897e |
comparison
equal
deleted
inserted
replaced
5016:c142a64141a8 | 5017:0b781cdb0cfb |
---|---|
51 | 51 |
52 // Enable use of system proxies | 52 // Enable use of system proxies |
53 System.setProperty("java.net.useSystemProxies", "true"); | 53 System.setProperty("java.net.useSystemProxies", "true"); |
54 | 54 |
55 String proxy = System.getenv("HTTP_PROXY"); | 55 String proxy = System.getenv("HTTP_PROXY"); |
56 if (proxy == null) { | |
57 String proxy = System.getenv("http_proxy"); | |
58 } | |
59 | |
56 String proxyMsg = ""; | 60 String proxyMsg = ""; |
57 if (proxy != null) { | 61 if (proxy != null) { |
58 Pattern p = Pattern.compile("(?:http://)?([^:]+)(:\\d+)?"); | 62 Pattern p = Pattern.compile("(?:http://)?([^:]+)(:\\d+)?"); |
59 Matcher m = p.matcher(proxy); | 63 Matcher m = p.matcher(proxy); |
60 if (m.matches()) { | 64 if (m.matches()) { |