fix web dav URL

This commit is contained in:
Henrique Dias committed 2016-11-06 13:17:07 +00:00
1 parent 41e7894425
commit eeeb1ce0fd
3 files changed
+13 -8

No files matched your search

+1 -1
View File
@@ -64,7 +64,7 @@ func (f FileManager) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, err
}
// Checks if the request URL is for the WebDav server
if strings.HasPrefix(r.URL.Path, c.WebDavURL) {
if httpserver.Path(r.URL.Path).Matches(c.WebDavURL) {
// Checks for user permissions relatively to this PATH
if !user.Allowed(strings.TrimPrefix(r.URL.Path, c.WebDavURL)) {
return http.StatusForbidden, nil