mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-23 22:27:38 -05:00
Meh.
This commit is contained in:
parent
23f7f5ebba
commit
1a8f753303
2 changed files with 1 additions and 2 deletions
|
@ -181,12 +181,12 @@ func (b Browse) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error) {
|
|||
Items: fileinfos,
|
||||
}
|
||||
|
||||
// TODO: Use pooled buffers to reduce allocations
|
||||
var buf bytes.Buffer
|
||||
err = bc.Template.Execute(&buf, listing)
|
||||
if err != nil {
|
||||
return http.StatusInternalServerError, err
|
||||
}
|
||||
|
||||
w.Header().Set("Content-Type", "text/html; charset=utf-8")
|
||||
buf.WriteTo(w)
|
||||
|
||||
|
|
|
@ -48,7 +48,6 @@ func (t Templates) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error
|
|||
}
|
||||
|
||||
// Execute it
|
||||
// TODO: Use pooled buffers to reduce allocations
|
||||
var buf bytes.Buffer
|
||||
err = bc.Template.Execute(&buf, ctx)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue