Merge pull request #13 from hacdias/fix/set-depth-header

fix: set depth header
This commit is contained in:
Henrique Dias
2019-05-12 12:52:56 +01:00
committed by GitHub
+4
View File
@@ -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")
}
}
}