diff options
author | 2023-10-13 18:45:06 +0800 | |
---|---|---|
committer | 2023-10-13 20:21:58 -0700 | |
commit | fd69012357b618d0b09c44ab2ca148e5bcb56e4f (patch) | |
tree | ebf49193b3867f8d077bbfa83a838e7f6b8b8d24 /internal/http/response/builder.go | |
parent | 9f62704c672c35a0c1c151a50f20758191f8feef (diff) | |
download | v2-fd69012357b618d0b09c44ab2ca148e5bcb56e4f.tar.gz v2-fd69012357b618d0b09c44ab2ca148e5bcb56e4f.tar.zst v2-fd69012357b618d0b09c44ab2ca148e5bcb56e4f.zip |
Correct the timestamp format for Expires response header
Diffstat (limited to '')
-rw-r--r-- | internal/http/response/builder.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/http/response/builder.go b/internal/http/response/builder.go index 97f00733..97c86fce 100644 --- a/internal/http/response/builder.go +++ b/internal/http/response/builder.go @@ -60,7 +60,7 @@ func (b *Builder) WithoutCompression() *Builder { func (b *Builder) WithCaching(etag string, duration time.Duration, callback func(*Builder)) { b.headers["ETag"] = etag b.headers["Cache-Control"] = "public" - b.headers["Expires"] = time.Now().Add(duration).Format(time.RFC1123) + b.headers["Expires"] = time.Now().Add(duration).UTC().Format(http.TimeFormat) if etag == b.r.Header.Get("If-None-Match") { b.statusCode = http.StatusNotModified |