You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Oleg Kalnichevski (JIRA)" <ji...@apache.org> on 2018/04/16 15:22:00 UTC

[jira] [Resolved] (HTTPCLIENT-1915) httpClient.execute not thread-safe with redirectLocations

     [ https://issues.apache.org/jira/browse/HTTPCLIENT-1915?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Kalnichevski resolved HTTPCLIENT-1915.
-------------------------------------------
    Resolution: Invalid

> httpClient.execute not thread-safe with redirectLocations
> ---------------------------------------------------------
>
>                 Key: HTTPCLIENT-1915
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1915
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient (classic)
>    Affects Versions: 4.5.2
>         Environment: docker tomcat:7.0.72 (JRE 7)
>            Reporter: Nicolas Toublanc
>            Priority: Major
>
> Sometimes, with 2 simultaneous httpClient.execute, I got the following error:
> {code:java}
> java.util.ConcurrentModificationException: null at java.util.AbstractList$Itr.remove(AbstractList.java:380) at java.util.AbstractList.removeRange(AbstractList.java:571) at java.util.AbstractList.clear(AbstractList.java:234) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:102) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) at {code}
> The cause is redirectLocations collection (in RedirectExec.execute) not being thread-safe:**
> {code:java}
>   final List<URI> redirectLocations = context.getRedirectLocations();
>         if (redirectLocations != null) {
>             redirectLocations.clear();
>         }{code}
> I can't figure where this collection is created.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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