Browse Source

filer: proxy all http methods to volume servers

pull/1759/head
Chris Lu 4 years ago
parent
commit
759482e2ac
  1. 2
      weed/server/filer_server_handlers_proxy.go

2
weed/server/filer_server_handlers_proxy.go

@ -32,7 +32,7 @@ func (fs *FilerServer) proxyToVolumeServer(w http.ResponseWriter, r *http.Reques
return return
} }
proxyReq, err := http.NewRequest("GET", urlStrings[rand.Intn(len(urlStrings))], r.Body)
proxyReq, err := http.NewRequest(r.Method, urlStrings[rand.Intn(len(urlStrings))], r.Body)
if err != nil { if err != nil {
glog.Errorf("NewRequest %s: %v", urlStrings[0], err) glog.Errorf("NewRequest %s: %v", urlStrings[0], err)
w.WriteHeader(http.StatusInternalServerError) w.WriteHeader(http.StatusInternalServerError)

Loading…
Cancel
Save