From fd69012357b618d0b09c44ab2ca148e5bcb56e4f Mon Sep 17 00:00:00 2001 From: jinmiaoluo <39730824+jinmiaoluo@users.noreply.github.com> Date: Fri, 13 Oct 2023 18:45:06 +0800 Subject: Correct the timestamp format for Expires response header --- internal/http/response/builder.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal/http/response/builder.go') 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 -- cgit v1.2.3 'bun-polyfills'>bun-polyfills Unnamed repository; edit this file 'description' to name the repository.
aboutsummaryrefslogtreecommitdiff
path: root/examples/ssl.ts (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2023-02-13fix(FormData): make String explicit, thanks @dylan-conway (#2065)Gravatar Derrick Farris 1-1/+1
2023-02-13fix(FormData): add string literal operator (#2064)Gravatar Derrick Farris 1-2/+2
2023-02-13Add pretty printer for FormDataGravatar Jarred Sumner 5-1/+101
2023-02-13Add dynamic port assigning to Bun.serve (#2062)Gravatar MichaƂ Warda 3-5/+40
2023-02-13feat(napi): add `napi_get_value_bigint_words` (#2061)Gravatar Derrick Farris 3-0/+44
* feat(napi): add `napi_get_value_bigint_words` * fix(napi): handle `napi_get_value_bigint_words` arr too small
2023-02-13Fixes https://github.com/oven-sh/bun/issues/1456Gravatar Jarred Sumner 8-1/+148