Skip to content

Commit

Permalink
consume entity.
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Newson committed Jun 6, 2011
1 parent 094ac8c commit b41bbb7
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -168,7 +168,11 @@ private void addAttachment(final RhinoAttachment attachment, final String id, fi

public Void handleResponse(final HttpResponse response) throws ClientProtocolException, IOException {
final HttpEntity entity = response.getEntity();
Tika.INSTANCE.parse(entity.getContent(), entity.getContentType().getValue(), attachment.fieldName, out);
try {
Tika.INSTANCE.parse(entity.getContent(), entity.getContentType().getValue(), attachment.fieldName, out);
} finally {
entity.consumeContent();
}
return null;
}
};
Expand Down

0 comments on commit b41bbb7

Please sign in to comment.