aboutsummaryrefslogtreecommitdiff
path: root/weed/server/common.go
diff options
context:
space:
mode:
authorhilimd <68371223+hilimd@users.noreply.github.com>2020-10-14 16:39:45 +0800
committerGitHub <noreply@github.com>2020-10-14 16:39:45 +0800
commita91137579857a3ef40725dccda85f40d0ac77223 (patch)
treeab389cfefe7796600aeaca14773992daf7746752 /weed/server/common.go
parent2ff727a32d6d879a49ff5848b592518c96bb6403 (diff)
parent1069b325dd92b6a1b16a20290acc8129d5e19ef8 (diff)
downloadseaweedfs-a91137579857a3ef40725dccda85f40d0ac77223.tar.xz
seaweedfs-a91137579857a3ef40725dccda85f40d0ac77223.zip
Merge pull request #26 from chrislusf/master
sync
Diffstat (limited to 'weed/server/common.go')
-rw-r--r--weed/server/common.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/server/common.go b/weed/server/common.go
index 75fc3ad9e..44098a4b5 100644
--- a/weed/server/common.go
+++ b/weed/server/common.go
@@ -274,7 +274,7 @@ func processRangeRequest(r *http.Request, w http.ResponseWriter, totalSize int64
ra := ranges[0]
w.Header().Set("Content-Length", strconv.FormatInt(ra.length, 10))
w.Header().Set("Content-Range", ra.contentRange(totalSize))
- // w.WriteHeader(http.StatusPartialContent)
+ w.WriteHeader(http.StatusPartialContent)
err = writeFn(w, ra.start, ra.length)
if err != nil {
@@ -315,7 +315,7 @@ func processRangeRequest(r *http.Request, w http.ResponseWriter, totalSize int64
if w.Header().Get("Content-Encoding") == "" {
w.Header().Set("Content-Length", strconv.FormatInt(sendSize, 10))
}
- // w.WriteHeader(http.StatusPartialContent)
+ w.WriteHeader(http.StatusPartialContent)
if _, err := io.CopyN(w, sendContent, sendSize); err != nil {
http.Error(w, "Internal Error", http.StatusInternalServerError)
return