Some small updates and new Timer class
This commit is contained in:
parent
41a5049e04
commit
56a59a959c
4 changed files with 178 additions and 9 deletions
|
|
@ -71,7 +71,7 @@ public class HttpFilePage implements HttpPage{
|
|||
else { // Resource root is a folder
|
||||
File file = new File(resource_root,
|
||||
client_info.getRequestURL());
|
||||
if(file.getAbsolutePath().startsWith(resource_root.getAbsolutePath())){
|
||||
if(file.getCanonicalPath().startsWith(resource_root.getCanonicalPath())){
|
||||
if(file.isDirectory() && showFolders){
|
||||
File indexFile = new File(file, "index.html");
|
||||
// Redirect to index.html
|
||||
|
|
@ -90,6 +90,9 @@ public class HttpFilePage implements HttpPage{
|
|||
}
|
||||
out.println("</UL><HR></BODY></HTML>");
|
||||
}
|
||||
else {
|
||||
throw new SecurityException("User not allowed to view folder: root=" + resource_root.getAbsolutePath());
|
||||
}
|
||||
}
|
||||
else {
|
||||
deliverFile(file, out);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue