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

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

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


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

        

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

Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
    [ 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

        

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

Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-1211?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bryan Duxbury closed THRIFT-1211.
---------------------------------

    Resolution: Fixed
      Assignee: Mathias Herberts

> 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
>            Assignee: 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

        

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

Posted by "Mathias Herberts (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-1211?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mathias Herberts updated THRIFT-1211:
-------------------------------------

    Attachment: THRIFT-1211.patch

> 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

        

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

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1211?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13053350#comment-13053350 ] 

Hudson commented on THRIFT-1211:
--------------------------------

Integrated in Thrift #171 (See [https://builds.apache.org/job/Thrift/171/])
    

> 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
>            Assignee: 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