cli icon indicating copy to clipboard operation
cli copied to clipboard

honor both http(s)_proxy and HTTP(s)_PROXY env vars correctly in java lang handler

Open denismakogon opened this issue 5 years ago • 1 comments

at this moment, java lang helper only looks up for http(s)_proxy env var, but that's only half of proxy configuration, there's a need to support both http_proxy and HTTP_PROXY env vars, see https://github.com/fnproject/cli/blob/master/langs/java.go#L168

denismakogon avatar Mar 27 '19 09:03 denismakogon

I also think the nonProxyHosts handling is incomplete. Typically the bash env no_proxy value uses a starting period to indicate wildcards. For example: .example.com In the Java world there should be an asterisk like so: *.example.com

https://www.gnu.org/software/wget/manual/html_node/Proxies.html https://docs.oracle.com/javase/7/docs/api/java/net/doc-files/net-properties.html

Sometimes you might see asterisks in the bash no_proxy but usually not. The conversion should probably test each value for a starting period and prepend an asterisk.

Right now I'm working around the inconsistency by putting both formats in by bash no_proxy. For example:

export no_proxy=.example.com,*.example.com

chasetec avatar Feb 25 '22 23:02 chasetec