Fix ETag header format.

This commit is contained in:
Catherine
2025-09-17 10:31:20 +00:00
parent 6463c4d2c5
commit 9e7ea8b5f1

View File

@@ -70,7 +70,7 @@ func getPage(w http.ResponseWriter, r *http.Request) error {
} else if entry.Type == Type_InlineFile {
reader = bytes.NewReader(entry.Data)
} else if entry.Type == Type_ExternalFile {
etag := fmt.Sprintf(`"%x"`, entry.Data)
etag := fmt.Sprintf(`"%s"`, entry.Data)
if r.Header.Get("If-None-Match") == etag {
w.WriteHeader(http.StatusNotModified)
return nil