Fossil SCM

Changed the default ETag expire age from 1 day to 10 years. See included comment for defense.

wyoung 2020-08-04 00:40 etag-always
Commit af848dce9571db681f7134cdc5dea41d44947ec908dad6d15bdbc1a07fbbad28
1 file changed +4 -1
+4 -1
--- src/etag.c
+++ src/etag.c
@@ -97,11 +97,14 @@
9797
const char *zIfNoneMatch;
9898
char zBuf[50];
9999
assert( zETag[0]==0 ); /* Only call this routine once! */
100100
101101
if( etagCancelled ) return;
102
- iMaxAge = 86400;
102
+
103
+ /* By default, ETagged URLs never expire since the ETag will change
104
+ * when the content changes. Approximate this policy as 10 years. */
105
+ iMaxAge = 10 * 365 * 24 * 60 * 60;
103106
md5sum_init();
104107
105108
/* Always include the executable ID as part of the hash */
106109
md5sum_step_text("exe-id: ", -1);
107110
md5sum_step_text(fossil_exe_id(), -1);
108111
--- src/etag.c
+++ src/etag.c
@@ -97,11 +97,14 @@
97 const char *zIfNoneMatch;
98 char zBuf[50];
99 assert( zETag[0]==0 ); /* Only call this routine once! */
100
101 if( etagCancelled ) return;
102 iMaxAge = 86400;
 
 
 
103 md5sum_init();
104
105 /* Always include the executable ID as part of the hash */
106 md5sum_step_text("exe-id: ", -1);
107 md5sum_step_text(fossil_exe_id(), -1);
108
--- src/etag.c
+++ src/etag.c
@@ -97,11 +97,14 @@
97 const char *zIfNoneMatch;
98 char zBuf[50];
99 assert( zETag[0]==0 ); /* Only call this routine once! */
100
101 if( etagCancelled ) return;
102
103 /* By default, ETagged URLs never expire since the ETag will change
104 * when the content changes. Approximate this policy as 10 years. */
105 iMaxAge = 10 * 365 * 24 * 60 * 60;
106 md5sum_init();
107
108 /* Always include the executable ID as part of the hash */
109 md5sum_step_text("exe-id: ", -1);
110 md5sum_step_text(fossil_exe_id(), -1);
111

Keyboard Shortcuts

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