Fix timeout in grab; remove pprof

This commit is contained in:
Mukhtar Akere
2025-05-20 18:47:05 +01:00
parent 5aa1c67544
commit 57ccd67c83
5 changed files with 33 additions and 38 deletions

View File

@@ -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 ""
}