Chris Lu 4 years ago
parent
commit
1e033d45b8
  1. 2
      weed/server/filer_server_handlers_read.go

2
weed/server/filer_server_handlers_read.go

@ -79,7 +79,7 @@ func (fs *FilerServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request,
w.Header().Set("Last-Modified", entry.Attr.Mtime.UTC().Format(http.TimeFormat))
if r.Header.Get("If-Modified-Since") != "" {
if t, parseError := time.Parse(http.TimeFormat, r.Header.Get("If-Modified-Since")); parseError == nil {
if t.After(entry.Attr.Mtime) || t.Equal(entry.Attr.Mtime) {
if !t.Before(entry.Attr.Mtime) {
w.WriteHeader(http.StatusNotModified)
return
}

Loading…
Cancel
Save