Add max-depth constrain. Fix issue #4.

This commit is contained in:
zicla
2018-01-17 01:16:34 +08:00
parent 452c48c17e
commit 042bc6ca1a
5 changed files with 71 additions and 22 deletions

View File

@ -7,7 +7,6 @@ import (
"net/http"
"os"
"strings"
)
//用于处理所有前来的请求
@ -117,7 +116,7 @@ func (this *Router) ServeHTTP(writer http.ResponseWriter, request *http.Request)
filePath = dir + "/index.html"
exists, _ = PathExists(filePath)
if !exists {
panic("404 not found")
panic(fmt.Sprintf("404 not found:%s", requestURI))
}
}