Skip to content

Commit

Permalink
fixed bad-gzip-trailer behaviour (now cuts off trailer)
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@42 6c8d7289-2bf4-0310-a012-ef5d649a1542
  • Loading branch information
orbiter committed Apr 22, 2005
1 parent 00f223c commit 87a61a0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions source/de/anomic/http/httpdProxyHandler.java
Expand Up @@ -573,6 +573,17 @@ public void doGet(Properties conProp, httpHeader requestHeader, OutputStream res
// and most possible corrupted
if (cacheFile.exists()) cacheFile.delete();
respondHeader(respond,"404 client unexpectedly closed connection", new httpHeader(null));
} catch (IOException e) {
// can have various reasons
if (cacheFile.exists()) cacheFile.delete();
if (e.getMessage().indexOf("Corrupt GZIP trailer") >= 0) {
// just do nothing, we leave it this way
log.logDebug("ignoring bad gzip trail for URL " + url + " (" + e.getMessage() + ")");
} else {
respondHeader(respond,"404 client unexpectedly closed connection", new httpHeader(null));
log.logDebug("IOError for URL " + url + " (" + e.getMessage() + ") - responded 404");
e.printStackTrace();
}
}
remote.close();
} catch (Exception e) {
Expand Down

0 comments on commit 87a61a0

Please sign in to comment.