aboutsummaryrefslogtreecommitdiff
path: root/weed/server/volume_server_handlers_read.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-02-10 20:23:04 -0800
committerChris Lu <chris.lu@gmail.com>2020-02-10 20:23:04 -0800
commitac3fc922566c42fb2d1d5603e7b0c167b868fce7 (patch)
tree3451368af70559711e435ba3dbb92c3752ff919c /weed/server/volume_server_handlers_read.go
parent29945fad51320deb7c72f57d1c7a84bcc51429da (diff)
downloadseaweedfs-origin/fasthttp.tar.xz
seaweedfs-origin/fasthttp.zip
partially doneorigin/fasthttp
Diffstat (limited to 'weed/server/volume_server_handlers_read.go')
-rw-r--r--weed/server/volume_server_handlers_read.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/weed/server/volume_server_handlers_read.go b/weed/server/volume_server_handlers_read.go
index d89d13a0d..ee8112b3e 100644
--- a/weed/server/volume_server_handlers_read.go
+++ b/weed/server/volume_server_handlers_read.go
@@ -27,7 +27,7 @@ import (
var fileNameEscaper = strings.NewReplacer("\\", "\\\\", "\"", "\\\"")
-func (vs *VolumeServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request) {
+func (vs *VolumeServer) OldGetOrHeadHandler(w http.ResponseWriter, r *http.Request) {
stats.VolumeServerRequestCounter.WithLabelValues("get").Inc()
start := time.Now()
@@ -36,8 +36,8 @@ func (vs *VolumeServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request)
n := new(needle.Needle)
vid, fid, filename, ext, _ := parseURLPath(r.URL.Path)
- if !vs.maybeCheckJwtAuthorization(r, vid, fid, false) {
- writeJsonError(w, r, http.StatusUnauthorized, errors.New("wrong jwt"))
+ if !vs.oldMaybeCheckJwtAuthorization(r, vid, fid, false) {
+ oldWriteJsonError(w, r, http.StatusUnauthorized, errors.New("wrong jwt"))
return
}
@@ -115,9 +115,9 @@ func (vs *VolumeServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request)
return
}
if r.Header.Get("ETag-MD5") == "True" {
- setEtag(w, n.MD5())
+ oldSetEtag(w, n.MD5())
} else {
- setEtag(w, n.Etag())
+ oldSetEtag(w, n.Etag())
}
if n.HasPairs() {