Skip to content
Browse files

consume entity.

  • Loading branch information...
1 parent 094ac8c commit b41bbb76e4bff568ebef59801c8b91aa9882c0c6 Robert Newson committed Jun 6, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/main/java/com/github/rnewson/couchdb/lucene/rhino/RhinoDocument.java
View
6 src/main/java/com/github/rnewson/couchdb/lucene/rhino/RhinoDocument.java
@@ -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;
}
};

0 comments on commit b41bbb7

Please sign in to comment.
Something went wrong with that request. Please try again.