Fix read from closed input stream

Apparently EntityUtils.toString consumes the entity's content stream, and calling twice results in error