[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-2357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17914731#comment-17914731
 ] 

ASF subversion and git services commented on HTTPCLIENT-2357:
-------------------------------------------------------------

Commit f558b7b7727ea6a396d2e693bd5abbc2b94be91d in httpcomponents-client's 
branch refs/heads/HTTPCLIENT-2357 from Oleg Kalnichevski
[ https://gitbox.apache.org/repos/asf?p=httpcomponents-client.git;h=f558b7b77 ]

HTTPCLIENT-2357: (regression) classic HttpClient fails to release connect in 
case of a proxy authentication failure


> HttpClient is not releasing connections when a proxy returns status codes  != 
> 200
> ---------------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-2357
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2357
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient (classic)
>    Affects Versions: 5.4-beta1, 5.4, 5.4.1
>            Reporter: Tomasz Zasada
>            Priority: Major
>              Labels: regresion
>             Fix For: 5.4.2, 5.5-alpha1
>
>
> HttpClient is not releasing connections when a proxy returns status codes != 
> 200.
> *How to reproduce:*
>  # Set up a proxy server that will respond with e.g.: {{403 Forbidden}} 
> status code.
> It can simply be an HTTP server that responds with `{{{}HTTP/1.1 403 
> Forbidden{}}}`.
>  # Set up HttpClient v5 to use the proxy:
>  # ```
> {{CloseableHttpClient client = HttpClients.custom()}}
> {{.setProxy(HttpHost.create(PROXY_URL))}}
> {{.build();}}
> ```
>  # Set DEBUG log level for 
> {{org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager}} to 
> see lease/release logs.
>  # Make requests to e.g.: `[https://atlassian.com|https://atlassian.com/]`:
> ```
> {{client.execute(new HttpPost("https://atlassian.com";), response -> 
> response);}}
> ```
>  # Connections are not released, eventually making the client reach the total 
> limit. 
>  
> The faulty code was introduced in 
> `{{{}215571a0bdb08849dcee315d456f4ecc93b89863{}}}` commit in 
> {{org.apache.hc.client5.http.impl.classic.ConnectExec}} class.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org
For additional commands, e-mail: dev-h...@hc.apache.org

Reply via email to