This commit is contained in:
Henrique Dias
2016-11-15 13:38:55 +00:00
parent b9cbf2a49f
commit b7dc9f4ffc
2 changed files with 3 additions and 17 deletions

View File

@@ -10,7 +10,6 @@ package filemanager
import (
e "errors"
"net/http"
"net/url"
"strings"
"github.com/hacdias/caddy-filemanager/assets"
@@ -84,18 +83,7 @@ func (f FileManager) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, err
// Preprocess the PUT request if it's the case
if r.Method == http.MethodPut {
var urlp *url.URL
urlp, err = url.Parse(strings.Replace(r.URL.String(), c.WebDavURL, "", 1))
if err != nil {
return code, err
}
fi, code, err = file.GetInfo(urlp, c, user)
if err != nil {
return code, err
}
if handlers.PreProccessPUT(w, r, c, user, fi) != nil {
if handlers.PreProccessPUT(w, r, c, user) != nil {
return http.StatusInternalServerError, err
}
}