smal but important correction of last commit @ HTTPClient

(if there is a response it really should be taken to its end)

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7290 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
sixcooler 14 years ago
parent acd93b1b31
commit 85c65475fa

@ -447,11 +447,11 @@ public class HTTPClient {
byte[] content = null;
try {
execute(httpUriRequest);
if (httpResponse == null || httpResponse.getStatusLine().getStatusCode() != 200) return null;
if (httpResponse == null) return null;
// get the response body
final HttpEntity httpEntity = httpResponse.getEntity();
if (httpEntity != null) {
if (httpEntity.getContentLength() < maxBytes) {
if (getStatusCode() == 200 && httpEntity.getContentLength() < maxBytes) {
content = EntityUtils.toByteArray(httpEntity);
}
// TODO: The name of this method is misnomer.

Loading…
Cancel
Save