mirror of https://github.com/miniflux/v2.git
Correct the timestamp format for Expires response header
This commit is contained in:
parent
9f62704c67
commit
fd69012357
|
@ -60,7 +60,7 @@ func (b *Builder) WithoutCompression() *Builder {
|
||||||
func (b *Builder) WithCaching(etag string, duration time.Duration, callback func(*Builder)) {
|
func (b *Builder) WithCaching(etag string, duration time.Duration, callback func(*Builder)) {
|
||||||
b.headers["ETag"] = etag
|
b.headers["ETag"] = etag
|
||||||
b.headers["Cache-Control"] = "public"
|
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") {
|
if etag == b.r.Header.Get("If-None-Match") {
|
||||||
b.statusCode = http.StatusNotModified
|
b.statusCode = http.StatusNotModified
|
||||||
|
|
Loading…
Reference in New Issue