Skip to content

Commit

Permalink
Merge pull request #13 from hacdias/fix/set-depth-header
Browse files Browse the repository at this point in the history
fix: set depth header
  • Loading branch information
hacdias authored May 12, 2019
2 parents 8bf2c4e + 21ec95a commit 61462c1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions webdav.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ func (c *Config) ServeHTTP(w http.ResponseWriter, r *http.Request) {
info, err := u.Handler.FileSystem.Stat(context.TODO(), r.URL.Path)
if err == nil && info.IsDir() {
r.Method = "PROPFIND"

if r.Header.Get("Depth") == "" {
r.Header.Add("Depth", "1")
}
}
}

Expand Down

0 comments on commit 61462c1

Please sign in to comment.