1
0
mirror of https://github.com/golang/go synced 2024-11-18 20:04:52 -07:00

Don't send unspecified time for directories

This commit is contained in:
Nuno Cruces 2019-10-01 10:22:05 +01:00 committed by GitHub
parent af880809d8
commit 1c47620a09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -610,7 +610,7 @@ func serveFile(w ResponseWriter, r *Request, fs FileSystem, name string, redirec
writeNotModified(w)
return
}
w.Header().Set("Last-Modified", d.ModTime().UTC().Format(TimeFormat))
setLastModified(w, d.ModTime())
dirList(w, r, f)
return
}