1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-02 13:30:19 +00:00
This commit is contained in:
astaxie
2013-11-10 23:26:28 +08:00
parent 9446563e5b
commit 43057a2fcb
2 changed files with 4 additions and 7 deletions

View File

@ -461,6 +461,8 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
file := staticDir + r.URL.Path[len(prefix):]
finfo, err := os.Stat(file)
if err != nil {
Warn(err)
http.NotFound(w, r)
return
}
//if the request is dir and DirectoryIndex is false then