- Set up an authenticating HTTP proxy (I used Squid)
- Specify the https.proxyHost, https.proxyPort, https.proxyUser and https.proxyPassword system properties
- Specify useSystemProperties when creating the client
- Make a call (to an HTTPS target)
The call fails with a 407.
That the client would be able to authenticate towards the proxy.
The reason that it doesn't work is that the AuthScope given to SystemDefaultCredentialsProvider uses "http" as scope (the SystemDefaultRoutePlanner always selects "http") but SystemDefaultCredentialsProvider uses this protocol as part of the name of the system properties from which to retrieve credentials and therefore looks for http.proxyHost, http.proxyPort, http.proxyUser and http.proxyPassword.
(a workaround is thus to specify all eight parameters, with both the http. and https. prefixes but that doesn't seem like a good solution)
I'll make a pull request with a suggested fix.