Skip to content

Commit

Permalink
bugfix for sharing png/gif files in WWW/SHARE
Browse files Browse the repository at this point in the history
  • Loading branch information
allo committed Oct 20, 2005
1 parent af30609 commit 117a424
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/de/anomic/http/httpdFileHandler.java
Expand Up @@ -425,6 +425,7 @@ public void doResponse(Properties conProp, httpHeader requestHeader, OutputStrea
if (!(path.startsWith("/"))) path = "/" + path; // attach leading slash
File targetFile = getLocalizedFile(path);
String targetExt = conProp.getProperty("EXT","");
targetClass = rewriteClassFile(new File(htDefaultPath, path));
if (path.endsWith("/")) {
String testpath;
// attach default file name
Expand All @@ -442,11 +443,10 @@ public void doResponse(Properties conProp, httpHeader requestHeader, OutputStrea
}
}
}else{
if (!(targetFile.exists()) && (!(path.endsWith("png")||path.endsWith("gif")))){
//you cannot share a .png/.gif file with a name like a class in htroot.
if ( !(targetFile.exists()) && !((path.endsWith("png")||path.endsWith("gif"))&&targetClass!=null ) ){
targetFile = new File(htDocsPath, path);
targetClass = rewriteClassFile(new File(htDocsPath, path));
}else{
targetClass = rewriteClassFile(new File(htDefaultPath, path));
}

}
Expand Down

0 comments on commit 117a424

Please sign in to comment.