| Summary: | jetty Http client does not send proxy authentication when requesting a Https-resource through a web-proxy | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [RT] Jetty | Reporter: | Andre Sikma <sikkesoft> | ||||||
| Component: | client | Assignee: | Thomas Becker <tbecker> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | janb, jetty-inbox, simone.bordet | ||||||
| Version: | 7.5.4 | ||||||||
| Target Milestone: | 7.5.x | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
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). |
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); } .... } ....