You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Freeman Yue Fang (Jira)" <ji...@apache.org> on 2026/06/25 18:45:00 UTC
[jira] [Commented] (CXF-9226) Proxy authentication fails with IllegalStateException instead of HTTPException (407)
[ https://issues.apache.org/jira/browse/CXF-9226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18091699#comment-18091699 ]
Freeman Yue Fang commented on CXF-9226:
---------------------------------------
With the attached ProxyAuthIllegalStateTest.java I can exactly reproduce this issue.
A fix is on the way.
> Proxy authentication fails with IllegalStateException instead of HTTPException (407)
> ------------------------------------------------------------------------------------
>
> Key: CXF-9226
> URL: https://issues.apache.org/jira/browse/CXF-9226
> Project: CXF
> Issue Type: Bug
> Components: JAX-WS Runtime
> Affects Versions: 4.2.0
> Environment: Asynchronous Apache HTTP Client 5, Proxy Authentication, Unkown User
> Reporter: Reto Weiss
> Assignee: Freeman Yue Fang
> Priority: Major
> Labels: HttpAsyncClient, Proxy
> Attachments: ProxyAuthIllegalStateTest.java
>
>
> I have written a Proxy WebServiceClientFeature where I setup a ProxyAuthorizationPolicy like here:
> {code:java}
> HTTPClientPolicy policy = httpConduit.getClient();
> policy.setProxyServer("...");
> policy.setNonProxyHosts("...");
> policy.setProxyServerPort(...);
> ProxyAuthorizationPolicy authPolicy = new ProxyAuthorizationPolicy();
> authPolicy.setUserName("unkown-user");
> authPolicy.setPassword("***");
> authPolicy.setAuthorizationType("Basic"); httpConduit.setProxyAuthorization(authPolicy);
> httpConduit.getClient().setMaxRetransmits(5);
> httpConduit.getClient().setAutoRedirect(true); {code}
> This works fine.
> However, if the provided user does not exists I get an IllegalStateException instead of an HTTPException (HTTP Response 407: ...) if I use the asynchronous Apache HTTP Client 5 as HTTPConduit. If I use any another HTTPConduit like the synchronous Apache HTTP Client 5 or the async or synch Apache HTTP client 4 the thrown exception is correct.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)