print error into http

pull/89/head v2.0.0-beta
Baokun Lee 2019-07-25 21:03:07 +08:00
parent b259869435
commit fac88abd58
1 changed files with 1 additions and 1 deletions

View File

@ -184,7 +184,7 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
} }
if openErr != nil { if openErr != nil {
code := http.StatusNotFound code := http.StatusNotFound
http.Error(w, "not found", code) http.Error(w, openErr.Error(), code)
return return
} }
defer f.Close() defer f.Close()