Fix timeout in grab; remove pprof
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
package webdav
|
||||
|
||||
import (
|
||||
"github.com/go-chi/chi/v5"
|
||||
"github.com/sirrobot01/decypharr/internal/utils"
|
||||
"github.com/stanNthe5/stringbuf"
|
||||
"net/http"
|
||||
"net/url"
|
||||
@@ -146,19 +144,3 @@ func writeXml(w http.ResponseWriter, status int, buf stringbuf.StringBuf) {
|
||||
w.WriteHeader(status)
|
||||
_, _ = w.Write(buf.Bytes())
|
||||
}
|
||||
|
||||
func getParam(r *http.Request, key string) string {
|
||||
if r.URL == nil || r.URL.Query() == nil {
|
||||
return ""
|
||||
}
|
||||
if v := chi.URLParam(r, key); v != "" {
|
||||
return utils.PathUnescape(v)
|
||||
}
|
||||
if v := r.URL.Query().Get(key); v != "" {
|
||||
return utils.PathUnescape(v)
|
||||
}
|
||||
if v := r.FormValue(key); v != "" {
|
||||
return utils.PathUnescape(v)
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user