}
// get the mimetype and put in the http header
String mimetypestr = getMimeTypeForFilename(filename);
if (mimetypestr != null) {
HttpHeader header = new HttpHeader("content-type", mimetypestr);
doc.addHeader(header);
}
// get the content from the file
File file = new File(filename);
if (!file.exists()) {