Browse Source

fix compilation error on go tip

pull/667/head
Chris Lu 7 years ago
parent
commit
17918f0b82
  1. 2
      weed/server/common.go
  2. 2
      weed/server/filer_server_handlers_read_dir.go
  3. 2
      weed/server/filer_server_handlers_write_monopart.go

2
weed/server/common.go

@ -75,7 +75,7 @@ func writeJsonError(w http.ResponseWriter, r *http.Request, httpStatus int, err
}
func debug(params ...interface{}) {
glog.V(4).Infoln(params)
glog.V(4).Infoln(params...)
}
func submitForClientHandler(w http.ResponseWriter, r *http.Request, masterUrl string) {

2
weed/server/filer_server_handlers_read_dir.go

@ -30,7 +30,7 @@ func (fs *FilerServer) listDirectoryHandler(w http.ResponseWriter, r *http.Reque
entries, err := fs.filer.ListDirectoryEntries(filer2.FullPath(path), lastFileName, false, limit)
if err != nil {
glog.V(0).Infof("listDirectory %s %s $d: %s", path, lastFileName, limit, err)
glog.V(0).Infof("listDirectory %s %s %d: %s", path, lastFileName, limit, err)
w.WriteHeader(http.StatusNotFound)
return
}

2
weed/server/filer_server_handlers_write_monopart.go

@ -84,7 +84,7 @@ func (fs *FilerServer) monolithicUploadAnalyzer(w http.ResponseWriter, r *http.R
*/
lastPos := strings.LastIndex(r.URL.Path, "/")
if lastPos == -1 || lastPos == 0 || lastPos == len(r.URL.Path)-1 {
glog.V(0).Infoln("URL Path [%s] is invalid, could not retrieve file name", r.URL.Path)
glog.V(0).Infof("URL Path [%s] is invalid, could not retrieve file name", r.URL.Path)
err = fmt.Errorf("URL Path is invalid")
writeJsonError(w, r, http.StatusInternalServerError, err)
return

Loading…
Cancel
Save