diff --git a/go/topology/store_replicate.go b/go/topology/store_replicate.go index 46d9e23e3..93f0506c5 100644 --- a/go/topology/store_replicate.go +++ b/go/topology/store_replicate.go @@ -11,6 +11,7 @@ import ( "github.com/chrislusf/seaweedfs/go/storage" "github.com/chrislusf/seaweedfs/go/util" "net" + "net/url" ) func ReplicatedWrite(masterNode string, s *storage.Store, @@ -29,8 +30,19 @@ func ReplicatedWrite(masterNode string, s *storage.Store, //send to other replica locations if r.FormValue("type") != "replicate" { if !distributedOperation(masterNode, s, volumeId, func(location operation.Location) bool { - _, err := operation.Upload( - "http://"+location.Url+r.URL.Path+"?type=replicate&ts="+strconv.FormatUint(needle.LastModified, 10), + args := url.Values{ + "type": {"replicate"}, + } + if needle.LastModified > 0 { + args.Set("ts", strconv.FormatUint(needle.LastModified, 10)) + } + if needle.IsChunkedManifest() { + args.Set("cm", "true") + } + + u := util.MkUrl(location.Url, r.URL.Path, args) + needle.IsChunkedManifest() + _, err := operation.Upload(u, string(needle.Name), bytes.NewReader(needle.Data), needle.IsGzipped(), string(needle.Mime), jwt) return err == nil diff --git a/go/util/constants.go b/go/util/constants.go index 073a2f896..6b6b0b911 100644 --- a/go/util/constants.go +++ b/go/util/constants.go @@ -1,5 +1,5 @@ package util const ( - VERSION = "0.70 beta" + VERSION = "0.71 beta" )