clj-http icon indicating copy to clipboard operation
clj-http copied to clipboard

system settings to configure authentication for proxy not working

Open behrica opened this issue 11 years ago • 1 comments

Setting the "standard" system settings to pass in proxy username and proxy password doe not work.

So this does not work:

(System/setProperty "https.proxyHost" "my HOST")
(System/setProperty "https.proxyPort" "my Port")
(System/setProperty "https.proxyUser" "my USER")
(System/setProperty "https.proxyPassword" "my PASSWORD")
(client/get "https://google.de")

I get an 407 (access denied) from the proxy. This means the first two settings get used, while the last two do not get used.

The following does work:

(client/get "https://google.de" {:proxy-host "my HOST" :proxy-port my-port :proxy-user "my user" :proxy-pass "my password"})

behrica avatar Sep 18 '14 09:09 behrica

I think this isn't supposed to work with java either. It seems to me that it's just a "convention" in java world to call such properties proxyUser and proxyPassword. Some examples here:

  • https://memorynotfound.com/configure-http-proxy-settings-java/
  • https://blogs.oracle.com/wssfc/handling-proxy-server-authentication-requests-in-java

Maybe this is a new feature request rather than a bug?

jumarko avatar Nov 01 '19 15:11 jumarko