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 (Resolved) (JIRA)" <ji...@apache.org> on 2011/12/10 15:31:40 UTC

[jira] [Resolved] (HTTPCLIENT-1151) DefaultHttpClient does not release connection if zero-length reply received

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

Oleg Kalnichevski resolved HTTPCLIENT-1151.
-------------------------------------------

    Resolution: Cannot Reproduce
    
> DefaultHttpClient does not release connection if zero-length reply received
> ---------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1151
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1151
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 4.1.1, 4.1.2
>            Reporter: Sergey Alaev
>         Attachments: wire.log
>
>
> When doing zero-length POST query using DefaultHttpClient/SingleClientConnManager it does not call SingleClientConnManager.releaseConnection
> Request: org.apache.http.HttpPost
> HTTP server response:
> HTTP/1.1 200 OK [Server: Apache-Coyote/1.1, Content-Length: 0, Date: Sat, 10 Dec 2011 09:17:53 GMT, Connection: close]
> Exception when doing another request reusing that DefaultHttpClient:
> Caused by: java.lang.IllegalStateException: Invalid use of SingleClientConnManager: connection still allocated.
> Make sure to release the connection before allocating another one.
> 	at org.apache.http.impl.conn.SingleClientConnManager.getConnection(SingleClientConnManager.java:216)
> 	at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:401)
> 	at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
> We are using digest auth if that matters:
> request.addHeader("X-Requested-Auth", "Digest");
> httpclient.getCredentialsProvider().setCredentials(
> 	new AuthScope(targetHost.getHostName(), targetHost.getPort(), AuthScope.ANY_REALM),
> 	new UsernamePasswordCredentials(username, password));

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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