Fossil SCM

Fix caching for bundled access to /builtin. Add a missing semicolon to the end of graph.js.

drh 2020-07-31 23:54 trunk
Commit 139db4c54e0b42d72dce66e391fa5b421e60d0e343c36ea4734260c77334f769
2 files changed +8 +1 -1
--- src/builtin.c
+++ src/builtin.c
@@ -144,10 +144,11 @@
144144
cgi_set_content_type(zType);
145145
pOut = cgi_output_blob();
146146
while( zList[0] ){
147147
int i = atoi(zList);
148148
if( i>0 && i<=count(aBuiltinFiles) ){
149
+ blob_appendf(pOut, "/* %s */\n", aBuiltinFiles[i-1].zName);
149150
blob_append(pOut, (const char*)aBuiltinFiles[i-1].pData,
150151
aBuiltinFiles[i-1].nByte);
151152
}
152153
while( fossil_isdigit(zList[0]) ) zList++;
153154
if( zList[0]==',' ) zList++;
@@ -185,10 +186,17 @@
185186
int nId;
186187
if( zName ) zTxt = builtin_text(zName);
187188
if( zTxt==0 ){
188189
const char *zM = P("m");
189190
if( zM ){
191
+ if( zId && (nId = (int)strlen(zId))>=8
192
+ && strncmp(zId,fossil_exe_id(),nId)==0
193
+ ){
194
+ g.isConst = 1;
195
+ }else{
196
+ etag_check(0,0);
197
+ }
190198
builtin_deliver_multiple_js_files(zM, zType);
191199
return;
192200
}
193201
cgi_set_status(404, "Not Found");
194202
@ File "%h(zName)" not found
195203
--- src/builtin.c
+++ src/builtin.c
@@ -144,10 +144,11 @@
144 cgi_set_content_type(zType);
145 pOut = cgi_output_blob();
146 while( zList[0] ){
147 int i = atoi(zList);
148 if( i>0 && i<=count(aBuiltinFiles) ){
 
149 blob_append(pOut, (const char*)aBuiltinFiles[i-1].pData,
150 aBuiltinFiles[i-1].nByte);
151 }
152 while( fossil_isdigit(zList[0]) ) zList++;
153 if( zList[0]==',' ) zList++;
@@ -185,10 +186,17 @@
185 int nId;
186 if( zName ) zTxt = builtin_text(zName);
187 if( zTxt==0 ){
188 const char *zM = P("m");
189 if( zM ){
 
 
 
 
 
 
 
190 builtin_deliver_multiple_js_files(zM, zType);
191 return;
192 }
193 cgi_set_status(404, "Not Found");
194 @ File "%h(zName)" not found
195
--- src/builtin.c
+++ src/builtin.c
@@ -144,10 +144,11 @@
144 cgi_set_content_type(zType);
145 pOut = cgi_output_blob();
146 while( zList[0] ){
147 int i = atoi(zList);
148 if( i>0 && i<=count(aBuiltinFiles) ){
149 blob_appendf(pOut, "/* %s */\n", aBuiltinFiles[i-1].zName);
150 blob_append(pOut, (const char*)aBuiltinFiles[i-1].pData,
151 aBuiltinFiles[i-1].nByte);
152 }
153 while( fossil_isdigit(zList[0]) ) zList++;
154 if( zList[0]==',' ) zList++;
@@ -185,10 +186,17 @@
186 int nId;
187 if( zName ) zTxt = builtin_text(zName);
188 if( zTxt==0 ){
189 const char *zM = P("m");
190 if( zM ){
191 if( zId && (nId = (int)strlen(zId))>=8
192 && strncmp(zId,fossil_exe_id(),nId)==0
193 ){
194 g.isConst = 1;
195 }else{
196 etag_check(0,0);
197 }
198 builtin_deliver_multiple_js_files(zM, zType);
199 return;
200 }
201 cgi_set_status(404, "Not Found");
202 @ File "%h(zName)" not found
203
+1 -1
--- src/graph.js
+++ src/graph.js
@@ -779,6 +779,6 @@
779779
if(!dataObj) break;
780780
var txJson = dataObj.textContent || dataObj.innerText;
781781
var tx = JSON.parse(txJson);
782782
TimelineGraph(tx);
783783
}
784
-}())
784
+}());
785785
--- src/graph.js
+++ src/graph.js
@@ -779,6 +779,6 @@
779 if(!dataObj) break;
780 var txJson = dataObj.textContent || dataObj.innerText;
781 var tx = JSON.parse(txJson);
782 TimelineGraph(tx);
783 }
784 }())
785
--- src/graph.js
+++ src/graph.js
@@ -779,6 +779,6 @@
779 if(!dataObj) break;
780 var txJson = dataObj.textContent || dataObj.innerText;
781 var tx = JSON.parse(txJson);
782 TimelineGraph(tx);
783 }
784 }());
785

Keyboard Shortcuts

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