|
|
@ -417,6 +417,11 @@ public final class httpdFileHandler extends httpdAbstractHandler implements http
|
|
|
|
e.getTargetException().getMessage(),e);
|
|
|
|
e.getTargetException().getMessage(),e);
|
|
|
|
targetClass = null;
|
|
|
|
targetClass = null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (bi == null) {
|
|
|
|
|
|
|
|
// error with image generation; send file-not-found
|
|
|
|
|
|
|
|
httpd.sendRespondError(this.connectionProperties,out,3,404,"File not Found",null,null);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
// send an image to client
|
|
|
|
targetDate = new Date(System.currentTimeMillis());
|
|
|
|
targetDate = new Date(System.currentTimeMillis());
|
|
|
|
String mimeType = mimeTable.getProperty(targetExt,"text/html");
|
|
|
|
String mimeType = mimeTable.getProperty(targetExt,"text/html");
|
|
|
|
|
|
|
|
|
|
|
@ -429,7 +434,7 @@ public final class httpdFileHandler extends httpdAbstractHandler implements http
|
|
|
|
httpd.sendRespondHeader(this.connectionProperties, out, "HTTP/1.1", 200, null, mimeType, result.length, targetDate, null, null, null, null);
|
|
|
|
httpd.sendRespondHeader(this.connectionProperties, out, "HTTP/1.1", 200, null, mimeType, result.length, targetDate, null, null, null, null);
|
|
|
|
Thread.currentThread().sleep(200); // see below
|
|
|
|
Thread.currentThread().sleep(200); // see below
|
|
|
|
serverFileUtils.write(result, out);
|
|
|
|
serverFileUtils.write(result, out);
|
|
|
|
|
|
|
|
}
|
|
|
|
} else if ((targetFile.exists()) && (targetFile.canRead())) {
|
|
|
|
} else if ((targetFile.exists()) && (targetFile.canRead())) {
|
|
|
|
// we have found a file that can be written to the client
|
|
|
|
// we have found a file that can be written to the client
|
|
|
|
// if this file uses templates, then we use the template
|
|
|
|
// if this file uses templates, then we use the template
|
|
|
|