Fossil SCM
Changed the default ETag expire age from 1 day to 10 years. See included comment for defense.
Commit
af848dce9571db681f7134cdc5dea41d44947ec908dad6d15bdbc1a07fbbad28
Parent
bc0b20356a0b508…
1 file changed
+4
-1
+4
-1
| --- src/etag.c | ||
| +++ src/etag.c | ||
| @@ -97,11 +97,14 @@ | ||
| 97 | 97 | const char *zIfNoneMatch; |
| 98 | 98 | char zBuf[50]; |
| 99 | 99 | assert( zETag[0]==0 ); /* Only call this routine once! */ |
| 100 | 100 | |
| 101 | 101 | 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; | |
| 103 | 106 | md5sum_init(); |
| 104 | 107 | |
| 105 | 108 | /* Always include the executable ID as part of the hash */ |
| 106 | 109 | md5sum_step_text("exe-id: ", -1); |
| 107 | 110 | md5sum_step_text(fossil_exe_id(), -1); |
| 108 | 111 |
| --- 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 |