carddav: cache file contents when opening it

This commit is contained in:
emersion
2017-09-14 11:08:16 +02:00
parent d2d201e6ad
commit 579a25f989
2 changed files with 12 additions and 2 deletions

View File

@@ -226,6 +226,7 @@ func (h *Handler) handleGetHeadPost(w http.ResponseWriter, r *http.Request) (sta
}
w.Header().Set("ETag", etag)
// Let ServeContent determine the Content-Type header.
// TODO: use getcontenttype dead prop if available
http.ServeContent(w, r, reqPath, fi.ModTime(), f)
return 0, nil
}