hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (HTTPCORE-233) EntityUtils.toString() turns missing content into ""
Date Thu, 16 Sep 2010 20:14:33 GMT

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

Oleg Kalnichevski resolved HTTPCORE-233.
----------------------------------------

    Resolution: Fixed

Fixed in SVN trunk. Please review.

Oleg

> EntityUtils.toString() turns missing content into ""
> ----------------------------------------------------
>
>                 Key: HTTPCORE-233
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-233
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore
>    Affects Versions: 4.0.1
>         Environment: Ubuntu 10.04 x64 java 6u21
>            Reporter: Steve Loughran
>            Priority: Minor
>             Fix For: 4.1
>
>
> I understand that some people may view this as expected behaviour, but I'm trying to
track down why some of my tests are failing with a message body of "" rather than some JSON,
and it looks to me a bit like {{EntityUtils}} is at fault for hiding the real problem.
> Looking at line 138 of {{EntityUtils}} , the code goes
> {code}
>         InputStream instream = entity.getContent();
>         if (instream == null) {
>             return "";
>         }
> {code}
> that is, null content is turned into an empty string. I'd be happier if null content
got returned as null, then I'd be able to distinguish problems. As it is, I'm going to have
to copy the method and tweak it. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


Mime
View raw message