cache file open bugfix

This commit is contained in:
ston1th 2022-06-03 23:37:29 +02:00
commit b69c78b380
2 changed files with 5 additions and 4 deletions

View file

@ -48,7 +48,7 @@ func skipLog(path string) bool {
func (fs *FileServer) ServeHTTP(w http.ResponseWriter, r *http.Request) {
s := &statusInterceptor{w: w}
w = s
if !skipLog(r.RequestURI) {
if !skipLog(r.URL.Path) {
defer func() {
if s.Status() == http.StatusPartialContent {
return
@ -57,7 +57,7 @@ func (fs *FileServer) ServeHTTP(w http.ResponseWriter, r *http.Request) {
"client", r.RemoteAddr,
"method", r.Method,
"status", s.Status(),
"uri", r.RequestURI,
"uri", r.URL.Path,
)
}()
}