Proxy Credentials not being passed to HTTP CONNECT requests - resulting in 400s

I’m passing proxy credentials as per the documentation:

val httpConf = http

Proxy(“myProxyHost”, 8080)
.credentials(“myUsername”, “myPassword”)

And on the most part, this works as expected.

However, when connecting to https sites, the HTTP CONNECT is not including the credentials - resulting in the proxy server returning a 407.

The next request in the stream passes credentials correctly, but as a result of the above, no CONNECT tunnel has been formed, and thus the request results in a 400 (bad request) response.

We’ve been looking at tcp dumps for cases going via gatling and going via a browser, and this is the key difference. We believe this is a bug somewhere in the https proxy credentials implementation - any chance I’m doing something wrong, or could you take a look?


There’s a similar issue currently being reported against AsyncHttpClient:
It’s under investigation.