diff options
author | Abdussamet Koçak <sssmmt@gmail.com> | 2022-08-16 07:31:45 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-15 22:31:45 -0600 |
commit | dc62d468e9645f52a5e1b4f6093dff65137ab3fe (patch) | |
tree | 3ea6243c1ab2d1d54ea66c8881fc4f2f6443ddab /modules | |
parent | c79c08627d36e9871dedd3c7d8889d7d710134c2 (diff) |
fileserver: reset buffer before using it (#4962) (#4963)
Diffstat (limited to 'modules')
-rw-r--r-- | modules/caddyhttp/fileserver/browse.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/caddyhttp/fileserver/browse.go b/modules/caddyhttp/fileserver/browse.go index da97842..9026356 100644 --- a/modules/caddyhttp/fileserver/browse.go +++ b/modules/caddyhttp/fileserver/browse.go @@ -94,6 +94,7 @@ func (fsrv *FileServer) serveBrowse(root, dirPath string, w http.ResponseWriter, fsrv.browseApplyQueryParams(w, r, &listing) buf := bufPool.Get().(*bytes.Buffer) + buf.Reset() defer bufPool.Put(buf) acceptHeader := strings.ToLower(strings.Join(r.Header["Accept"], ",")) |