hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Alaev (Updated) (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HTTPCLIENT-1151) DefaultHttpClient does not release connection if zero-length reply received
Date Sat, 10 Dec 2011 11:05:40 GMT

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

Sergey Alaev updated HTTPCLIENT-1151:
-------------------------------------

    Attachment: wire.log

Wire/context log as requested
Exception throws right after last line.
                
> 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


Mime
View raw message