Community
Participate
Working Groups
when using the http-client to request a https-resource through a web-proxy that uses (requires) authentication, the proxy authentication header with credentials are not included in the CONNECT request. Seen with 7.5.1; Code reading learned that the code has not changed suggested solution: public class HttpConnection .... private void commitRequest() throws IOException { .... - if (_destination.isProxied() && !HttpMethods.CONNECT.equals(method) && uri.startsWith("/")) + if (_destination.isProxied() ) + { + if ( !HttpMethods.CONNECT.equals(method) && uri.startsWith("/")) + { ... + } Authentication auth = _destination.getProxyAuthentication(); if (auth != null) auth.setCredentials(_exchange); } .... } ....
Created attachment 207749 [details] proposed patch Reviewed the suggested fix. Makes sense. Patch attached. I didn't test it though. Let me know if I should.
Thomas, Yes, please do test the patch before we commit it. thanks Jan (In reply to comment #1) > Created attachment 207749 [details] > proposed patch > > Reviewed the suggested fix. Makes sense. Patch attached. > > I didn't test it though. Let me know if I should.
Created attachment 209088 [details] proposed patch Hey Jan, I've attached a new patch including a new unit test testing the behaviour. Cheers, Thomas
Reviewed the patch, and modified the test to assume it can connect (or skip the test otherwise).