mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-10-15 00:34:52 +08:00
1. ensure replicated file has the same timestamp
2. upload can specify modified time by &ts=... 3. correctly return code 304
This commit is contained in:
@@ -90,7 +90,10 @@ func NewNeedle(r *http.Request) (n *Needle, e error) {
|
||||
}
|
||||
n.SetHasName()
|
||||
}
|
||||
n.LastModified = uint64(time.Now().Unix())
|
||||
var parseError error
|
||||
if n.LastModified, parseError = strconv.ParseUint(r.FormValue("ts"), 10, 64); parseError != nil {
|
||||
n.LastModified = uint64(time.Now().Unix())
|
||||
}
|
||||
n.SetHasLastModifiedDate()
|
||||
|
||||
n.Data = data
|
||||
|
Reference in New Issue
Block a user