优化代码

This commit is contained in:
GoEdgeLab
2023-08-08 10:07:24 +08:00
parent 7b6f9ac889
commit 61bd802f3c
8 changed files with 18 additions and 12 deletions

View File

@@ -95,7 +95,7 @@ func (this *HTTPRequest) doRoot() (isBreak bool) {
}
var filename = strings.Replace(requestPath, "/", Tea.DS, -1)
var filePath = ""
var filePath string
if len(filename) > 0 && filename[0:1] == Tea.DS {
filePath = rootDir + filename
} else {