mirror of
https://github.com/golang/net.git
synced 2026-03-31 10:27:08 +09:00
webdav: trailing slash on directories - https://github.com/golang/go/issues/29858
This commit is contained in:
@@ -556,7 +556,11 @@ func (h *Handler) handlePropfind(w http.ResponseWriter, r *http.Request) (status
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return mw.write(makePropstatResponse(path.Join(h.Prefix, reqPath), pstats))
|
||||
href := path.Join(h.Prefix, reqPath)
|
||||
if info.IsDir() {
|
||||
href += "/"
|
||||
}
|
||||
return mw.write(makePropstatResponse(href, pstats))
|
||||
}
|
||||
|
||||
walkErr := walkFS(ctx, h.FileSystem, depth, reqPath, fi, walkFn)
|
||||
|
||||
@@ -284,7 +284,7 @@ func TestFilenameEscape(t *testing.T) {
|
||||
wantDisplayName: `こんにちわ世界`,
|
||||
}, {
|
||||
name: `/Program Files/`,
|
||||
wantHref: `/Program%20Files`,
|
||||
wantHref: `/Program%20Files/`,
|
||||
wantDisplayName: `Program Files`,
|
||||
}, {
|
||||
name: `/go+lang`,
|
||||
|
||||
Reference in New Issue
Block a user