Fossil SCM
Add ETags cache control to the /tarball, /zip, and /sqlar pages.
Commit
f2492f3bb65a13d6e48951f0b7305d9bd927458c6c129ad3560bc8c2e4d25b59
Parent
ae660cd62f37ff0…
2 files changed
+1
+1
+1
| --- src/tar.c | ||
| +++ src/tar.c | ||
| @@ -731,10 +731,11 @@ | ||
| 731 | 731 | blob_appendf(&cacheKey, "/tarball/%z", rid_to_uuid(rid)); |
| 732 | 732 | blob_appendf(&cacheKey, "/%q", zName); |
| 733 | 733 | if( zInclude ) blob_appendf(&cacheKey, ",in=%Q", zInclude); |
| 734 | 734 | if( zExclude ) blob_appendf(&cacheKey, ",ex=%Q", zExclude); |
| 735 | 735 | zKey = blob_str(&cacheKey); |
| 736 | + etag_check(ETAG_HASH, zKey); | |
| 736 | 737 | |
| 737 | 738 | if( P("debug")!=0 ){ |
| 738 | 739 | style_header("Tarball Generator Debug Screen"); |
| 739 | 740 | @ zName = "%h(zName)"<br /> |
| 740 | 741 | @ rid = %d(rid)<br /> |
| 741 | 742 |
| --- src/tar.c | |
| +++ src/tar.c | |
| @@ -731,10 +731,11 @@ | |
| 731 | blob_appendf(&cacheKey, "/tarball/%z", rid_to_uuid(rid)); |
| 732 | blob_appendf(&cacheKey, "/%q", zName); |
| 733 | if( zInclude ) blob_appendf(&cacheKey, ",in=%Q", zInclude); |
| 734 | if( zExclude ) blob_appendf(&cacheKey, ",ex=%Q", zExclude); |
| 735 | zKey = blob_str(&cacheKey); |
| 736 | |
| 737 | if( P("debug")!=0 ){ |
| 738 | style_header("Tarball Generator Debug Screen"); |
| 739 | @ zName = "%h(zName)"<br /> |
| 740 | @ rid = %d(rid)<br /> |
| 741 |
| --- src/tar.c | |
| +++ src/tar.c | |
| @@ -731,10 +731,11 @@ | |
| 731 | blob_appendf(&cacheKey, "/tarball/%z", rid_to_uuid(rid)); |
| 732 | blob_appendf(&cacheKey, "/%q", zName); |
| 733 | if( zInclude ) blob_appendf(&cacheKey, ",in=%Q", zInclude); |
| 734 | if( zExclude ) blob_appendf(&cacheKey, ",ex=%Q", zExclude); |
| 735 | zKey = blob_str(&cacheKey); |
| 736 | etag_check(ETAG_HASH, zKey); |
| 737 | |
| 738 | if( P("debug")!=0 ){ |
| 739 | style_header("Tarball Generator Debug Screen"); |
| 740 | @ zName = "%h(zName)"<br /> |
| 741 | @ rid = %d(rid)<br /> |
| 742 |
+1
| --- src/zip.c | ||
| +++ src/zip.c | ||
| @@ -932,10 +932,11 @@ | ||
| 932 | 932 | blob_appendf(&cacheKey, "/%s/%z", g.zPath, rid_to_uuid(rid)); |
| 933 | 933 | blob_appendf(&cacheKey, "/%q", zName); |
| 934 | 934 | if( zInclude ) blob_appendf(&cacheKey, ",in=%Q", zInclude); |
| 935 | 935 | if( zExclude ) blob_appendf(&cacheKey, ",ex=%Q", zExclude); |
| 936 | 936 | zKey = blob_str(&cacheKey); |
| 937 | + etag_check(ETAG_HASH, zKey); | |
| 937 | 938 | |
| 938 | 939 | if( P("debug")!=0 ){ |
| 939 | 940 | style_header("%s Archive Generator Debug Screen", zType); |
| 940 | 941 | @ zName = "%h(zName)"<br /> |
| 941 | 942 | @ rid = %d(rid)<br /> |
| 942 | 943 |
| --- src/zip.c | |
| +++ src/zip.c | |
| @@ -932,10 +932,11 @@ | |
| 932 | blob_appendf(&cacheKey, "/%s/%z", g.zPath, rid_to_uuid(rid)); |
| 933 | blob_appendf(&cacheKey, "/%q", zName); |
| 934 | if( zInclude ) blob_appendf(&cacheKey, ",in=%Q", zInclude); |
| 935 | if( zExclude ) blob_appendf(&cacheKey, ",ex=%Q", zExclude); |
| 936 | zKey = blob_str(&cacheKey); |
| 937 | |
| 938 | if( P("debug")!=0 ){ |
| 939 | style_header("%s Archive Generator Debug Screen", zType); |
| 940 | @ zName = "%h(zName)"<br /> |
| 941 | @ rid = %d(rid)<br /> |
| 942 |
| --- src/zip.c | |
| +++ src/zip.c | |
| @@ -932,10 +932,11 @@ | |
| 932 | blob_appendf(&cacheKey, "/%s/%z", g.zPath, rid_to_uuid(rid)); |
| 933 | blob_appendf(&cacheKey, "/%q", zName); |
| 934 | if( zInclude ) blob_appendf(&cacheKey, ",in=%Q", zInclude); |
| 935 | if( zExclude ) blob_appendf(&cacheKey, ",ex=%Q", zExclude); |
| 936 | zKey = blob_str(&cacheKey); |
| 937 | etag_check(ETAG_HASH, zKey); |
| 938 | |
| 939 | if( P("debug")!=0 ){ |
| 940 | style_header("%s Archive Generator Debug Screen", zType); |
| 941 | @ zName = "%h(zName)"<br /> |
| 942 | @ rid = %d(rid)<br /> |
| 943 |