mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-18 22:36:43 +09:00
Backport #39435 Co-authored-by: breken <support@brekfuz.com>
This commit is contained in:
1 parent
efee6d7ce4
commit
02fd18970b
2 files changed
+16
-1
No files matched your search
@@ -99,7 +99,9 @@ func handleGenericETagTimeCache(req *http.Request, w http.ResponseWriter, etag s
|
||||
return true
|
||||
}
|
||||
}
|
||||
if lastModified != nil && !lastModified.IsZero() {
|
||||
// https://www.rfc-editor.org/rfc/rfc9110#section-13.1.3
|
||||
// A recipient MUST ignore If-Modified-Since if the request contains an If-None-Match header field
|
||||
if lastModified != nil && !lastModified.IsZero() && req.Header.Get("If-None-Match") == "" {
|
||||
ifModifiedSince := req.Header.Get("If-Modified-Since")
|
||||
if ifModifiedSince != "" {
|
||||
t, err := time.Parse(http.TimeFormat, ifModifiedSince)
|
||||
|
||||
Reference in new issue
Block a user