*) better support for http head requests of servlets

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1648 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
theli 19 years ago
parent deece1e6d5
commit 040624e361

@ -662,7 +662,9 @@ public final class httpdFileHandler extends httpdAbstractHandler implements http
}
// write the array to the client
httpd.sendRespondHeader(this.connectionProperties, out, httpVersion, 200, null, mimeType, result.length, targetDate, null, tp.getOutgoingHeader(), (zipContent)?"gzip":null, null, nocache);
long contentLength = method.equals(httpHeader.METHOD_HEAD)?-1:result.length;
String contentEncoding = method.equals(httpHeader.METHOD_HEAD)?null:(zipContent)?"gzip":null;
httpd.sendRespondHeader(this.connectionProperties, out, httpVersion, 200, null, mimeType, contentLength, targetDate, null, tp.getOutgoingHeader(), contentEncoding, null, nocache);
if (! method.equals(httpHeader.METHOD_HEAD)) {
Thread.sleep(200); // this solved the message problem (!!)
serverFileUtils.write(result, out);

Loading…
Cancel
Save