Fossil SCM

Enclose ETag header values in double quotes. Suggested in [forum:/forumpost/70bacf5cf8|Forum Post 70bacf5cf8].

florian 2025-05-30 04:27 trunk
Commit ad51cc61c6d2ca07f4e3e885e559f219c5af3e01c39345df621177ecdccc5d9d
1 file changed +1 -1
+1 -1
--- src/cgi.c
+++ src/cgi.c
@@ -505,11 +505,11 @@
505505
&& strcmp(zContentType,"text/html")!=0
506506
){
507507
/* Do not cache HTML replies as those will have been generated and
508508
** will likely, therefore, contains a nonce and we want that nonce to
509509
** be different every time. */
510
- blob_appendf(&hdr, "ETag: %s\r\n", etag_tag());
510
+ blob_appendf(&hdr, "ETag: \"%s\"\r\n", etag_tag());
511511
blob_appendf(&hdr, "Cache-Control: max-age=%d\r\n", etag_maxage());
512512
if( etag_mtime()>0 ){
513513
blob_appendf(&hdr, "Last-Modified: %s\r\n",
514514
cgi_rfc822_datestamp(etag_mtime()));
515515
}
516516
--- src/cgi.c
+++ src/cgi.c
@@ -505,11 +505,11 @@
505 && strcmp(zContentType,"text/html")!=0
506 ){
507 /* Do not cache HTML replies as those will have been generated and
508 ** will likely, therefore, contains a nonce and we want that nonce to
509 ** be different every time. */
510 blob_appendf(&hdr, "ETag: %s\r\n", etag_tag());
511 blob_appendf(&hdr, "Cache-Control: max-age=%d\r\n", etag_maxage());
512 if( etag_mtime()>0 ){
513 blob_appendf(&hdr, "Last-Modified: %s\r\n",
514 cgi_rfc822_datestamp(etag_mtime()));
515 }
516
--- src/cgi.c
+++ src/cgi.c
@@ -505,11 +505,11 @@
505 && strcmp(zContentType,"text/html")!=0
506 ){
507 /* Do not cache HTML replies as those will have been generated and
508 ** will likely, therefore, contains a nonce and we want that nonce to
509 ** be different every time. */
510 blob_appendf(&hdr, "ETag: \"%s\"\r\n", etag_tag());
511 blob_appendf(&hdr, "Cache-Control: max-age=%d\r\n", etag_maxage());
512 if( etag_mtime()>0 ){
513 blob_appendf(&hdr, "Last-Modified: %s\r\n",
514 cgi_rfc822_datestamp(etag_mtime()));
515 }
516

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button