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(
Proxy(“myProxyHost”, 8080)
.httpsPort(8143)
.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?

Thanks,
Rob

There’s a similar issue currently being reported against AsyncHttpClient: https://github.com/AsyncHttpClient/async-http-client/issues/1066
It’s under investigation.