Finish the mirror feature. Finish the prototype of zip compress.

This commit is contained in:
zicla
2019-04-28 22:18:42 +08:00
parent a4f28cca30
commit 6e0078e1d8
25 changed files with 800 additions and 128 deletions

View File

@ -2,7 +2,6 @@ package support
import (
"fmt"
"github.com/eyebluecn/tank/code/core"
"github.com/eyebluecn/tank/code/rest"
"github.com/eyebluecn/tank/code/tool/result"
@ -171,6 +170,7 @@ func (this *TankRouter) ServeHTTP(writer http.ResponseWriter, request *http.Requ
}
} else {
//当作静态资源处理。默认从当前文件下面的static文件夹中取东西。
dir := util.GetHtmlPath()
@ -180,10 +180,10 @@ func (this *TankRouter) ServeHTTP(writer http.ResponseWriter, request *http.Requ
}
filePath := dir + requestURI
exists, _ := util.PathExists(filePath)
exists := util.PathExists(filePath)
if !exists {
filePath = dir + "/index.html"
exists, _ = util.PathExists(filePath)
exists = util.PathExists(filePath)
if !exists {
panic(fmt.Sprintf("404 not found:%s", filePath))
}