diff options
author | KN4CK3R <KN4CK3R@users.noreply.github.com> | 2021-04-12 16:49:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-12 10:49:26 -0400 |
commit | a35a5b225c6f49a91459ae3e9e97d0ad6a7c16bd (patch) | |
tree | 0f31bd0eb9ef1972c5049fc173db974b46e41fe3 /modules/public/public.go | |
parent | 6d2866f20c7ba725a02d8ecdd42810291ef4f97c (diff) | |
download | gitea-a35a5b225c6f49a91459ae3e9e97d0ad6a7c16bd.tar.gz gitea-a35a5b225c6f49a91459ae3e9e97d0ad6a7c16bd.zip |
Add ETag header (#15370)
* Add ETag header.
* Comply with RFC 7232.
* Moved logic into httpcache.go
* Changed name.
* Lint
* Implemented If-None-Match list.
* Fixed missing header on *
* Removed weak etag support.
* Removed * support.
* Added unit test.
* Lint
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'modules/public/public.go')
-rw-r--r-- | modules/public/public.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/public/public.go b/modules/public/public.go index ee3d2cf75f..14525cfa0e 100644 --- a/modules/public/public.go +++ b/modules/public/public.go @@ -165,7 +165,7 @@ func (opts *Options) handle(w http.ResponseWriter, req *http.Request, opt *Optio log.Println("[Static] Serving " + file) } - if httpcache.HandleEtagCache(req, w, fi) { + if httpcache.HandleFileETagCache(req, w, fi) { return true } |