You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
357 B

  1. package weed_server
  2. import (
  3. "net/http"
  4. )
  5. func (fs *FilerServer) filerHandler(w http.ResponseWriter, r *http.Request) {
  6. switch r.Method {
  7. case "GET":
  8. fs.GetOrHeadHandler(w, r, true)
  9. case "HEAD":
  10. fs.GetOrHeadHandler(w, r, false)
  11. case "DELETE":
  12. fs.DeleteHandler(w, r)
  13. case "PUT":
  14. fs.PostHandler(w, r)
  15. case "POST":
  16. fs.PostHandler(w, r)
  17. }
  18. }