Fossil SCM

Honor the If-Modified-Since header even if the Fossil executable is more recent. Assume that any changes in the Fossil executable will make minimal difference in the output.

drh 2018-05-11 15:02 trunk
Commit 0419048804762787ac7b44cb5ad089942c543b41fc014ba9791ec85226654e6b
1 file changed +2
+2
--- src/etag.c
+++ src/etag.c
@@ -149,14 +149,16 @@
149149
zIfModifiedSince = P("HTTP_IF_MODIFIED_SINCE");
150150
if( zIfModifiedSince==0 ) return;
151151
x = cgi_rfc822_parsedate(zIfModifiedSince);
152152
if( x<=0 || x>mtime ) return;
153153
154
+#if 0
154155
/* If the Fossil executable is more recent than If-Modified-Since,
155156
** go ahead and regenerate the resource. */
156157
exeMtime = file_mtime(g.nameOfExe, ExtFILE);
157158
if( exeMtime>x ) return;
159
+#endif
158160
159161
/* If we reach this point, it means that the resource has not changed
160162
** and that we should generate a 304 Not Modified reply */
161163
cgi_reset_content();
162164
cgi_set_status(304, "Not Modified");
163165
--- src/etag.c
+++ src/etag.c
@@ -149,14 +149,16 @@
149 zIfModifiedSince = P("HTTP_IF_MODIFIED_SINCE");
150 if( zIfModifiedSince==0 ) return;
151 x = cgi_rfc822_parsedate(zIfModifiedSince);
152 if( x<=0 || x>mtime ) return;
153
 
154 /* If the Fossil executable is more recent than If-Modified-Since,
155 ** go ahead and regenerate the resource. */
156 exeMtime = file_mtime(g.nameOfExe, ExtFILE);
157 if( exeMtime>x ) return;
 
158
159 /* If we reach this point, it means that the resource has not changed
160 ** and that we should generate a 304 Not Modified reply */
161 cgi_reset_content();
162 cgi_set_status(304, "Not Modified");
163
--- src/etag.c
+++ src/etag.c
@@ -149,14 +149,16 @@
149 zIfModifiedSince = P("HTTP_IF_MODIFIED_SINCE");
150 if( zIfModifiedSince==0 ) return;
151 x = cgi_rfc822_parsedate(zIfModifiedSince);
152 if( x<=0 || x>mtime ) return;
153
154 #if 0
155 /* If the Fossil executable is more recent than If-Modified-Since,
156 ** go ahead and regenerate the resource. */
157 exeMtime = file_mtime(g.nameOfExe, ExtFILE);
158 if( exeMtime>x ) return;
159 #endif
160
161 /* If we reach this point, it means that the resource has not changed
162 ** and that we should generate a 304 Not Modified reply */
163 cgi_reset_content();
164 cgi_set_status(304, "Not Modified");
165

Keyboard Shortcuts

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