diff options
| author | Chris Lu <chris.lu@gmail.com> | 2013-07-10 00:25:14 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2013-07-10 00:25:14 -0700 |
| commit | 4c200acd7dd663bed5f566c5538114ef66e5cbe3 (patch) | |
| tree | 7c186175c22a45d8346ce02ad6fb61766e2876c3 /go/weed/volume.go | |
| parent | 53b6831f73ffcf4dcb6cbf6fdff0d7e60389745c (diff) | |
| download | seaweedfs-4c200acd7dd663bed5f566c5538114ef66e5cbe3.tar.xz seaweedfs-4c200acd7dd663bed5f566c5538114ef66e5cbe3.zip | |
1. ensure replicated file has the same timestamp
2. upload can specify modified time by &ts=...
3. correctly return code 304
Diffstat (limited to 'go/weed/volume.go')
| -rw-r--r-- | go/weed/volume.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/go/weed/volume.go b/go/weed/volume.go index 039212793..d6c0af123 100644 --- a/go/weed/volume.go +++ b/go/weed/volume.go @@ -149,7 +149,7 @@ func GetOrHeadHandler(w http.ResponseWriter, r *http.Request, isGetMethod bool) w.Header().Set("Last-Modified", time.Unix(int64(n.LastModified), 0).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.Unix() <= int64(n.LastModified) { + if t.Unix() >= int64(n.LastModified) { w.WriteHeader(http.StatusNotModified) return } |
