Browse Source

Remove index.htm

Vova Tkach 6 years ago
parent
commit
becfbf7da6
1 changed files with 2 additions and 9 deletions
  1. 2 9
      engine/wrapper/static.go

+ 2 - 9
engine/wrapper/static.go

@@ -55,18 +55,11 @@ func (e *Wrapper) staticResource() bool {
 func (e *Wrapper) staticFile() bool {
 	file := e.R.URL.Path
 	if file == "/" {
-		f, err := os.Open(e.DirVhostHome + "/htdocs" + "/index.htm")
+		f, err := os.Open(e.DirVhostHome + "/htdocs" + "/index.html")
 		if err == nil {
 			defer f.Close()
-			http.ServeFile(*e.W, e.R, e.DirVhostHome+"/htdocs"+"/index.htm")
+			http.ServeFile(*e.W, e.R, e.DirVhostHome+"/htdocs"+"/index.html")
 			return true
-		} else {
-			f, err = os.Open(e.DirVhostHome + "/htdocs" + "/index.html")
-			if err == nil {
-				defer f.Close()
-				http.ServeFile(*e.W, e.R, e.DirVhostHome+"/htdocs"+"/index.html")
-				return true
-			}
 		}
 	} else {
 		f, err := os.Open(e.DirVhostHome + "/htdocs" + file)