Bug 741165 - Correct SyncResponse.jsonBody. r=msamuel

This commit is contained in:
Richard Newman 2012-04-03 16:43:06 -07:00
parent 6b7627f5c1
commit f647ced7ae

View File

@ -71,14 +71,19 @@ public class SyncResponse {
ParseException {
if (body != null) {
// Do it from the cached String.
ExtendedJSONObject.parse(body);
return ExtendedJSONObject.parse(body);
}
HttpEntity entity = this.response.getEntity();
if (entity == null) {
return null;
}
InputStream content = entity.getContent();
try {
return ExtendedJSONObject.parse(content);
} finally {
content.close();
}
}
/**