I had a similar issue during a migration from jetty 9 to 12. You have to check if HttpClientHTTPConduit is executing this part message.put("USING_URLCONNECTION", Boolean.TRUE);
. This will ensure that code will use URLConnectionHTTPConduit to call setProtocolHeaders
which won't try to get an HttpClient from the message like HttpClientHTTPConduit does. This solved my problem.