You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Bryan Duxbury (JIRA)" <ji...@apache.org> on 2011/06/17 01:23:47 UTC

[jira] [Commented] (THRIFT-1211) When using THttpClient, non 200 responses leave the connection open

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

Bryan Duxbury commented on THRIFT-1211:
---------------------------------------

Patch looks good... any chance I could coerce a test out of you as well?

> When using THttpClient, non 200 responses leave the connection open
> -------------------------------------------------------------------
>
>                 Key: THRIFT-1211
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1211
>             Project: Thrift
>          Issue Type: Bug
>          Components: Java - Library
>    Affects Versions: 0.6.1
>         Environment: All
>            Reporter: Mathias Herberts
>             Fix For: 0.7
>
>         Attachments: THRIFT-1211.patch
>
>
> The call to HttpClient.execute is done in a try/catch/finally which includes closing of entity's input stream in the finally clause (thus freeing resources).
> The problem is that when the response code is not 200 (OK), an exception is thrown BEFORE the inputstream is retrieved from the response's entity, when executing the finally clause, the resources are not freed as the inputstream is null.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira