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.
Commit
0419048804762787ac7b44cb5ad089942c543b41fc014ba9791ec85226654e6b
Parent
c0ed95060c17ab4…
1 file changed
+2
+2
| --- src/etag.c | ||
| +++ src/etag.c | ||
| @@ -149,14 +149,16 @@ | ||
| 149 | 149 | zIfModifiedSince = P("HTTP_IF_MODIFIED_SINCE"); |
| 150 | 150 | if( zIfModifiedSince==0 ) return; |
| 151 | 151 | x = cgi_rfc822_parsedate(zIfModifiedSince); |
| 152 | 152 | if( x<=0 || x>mtime ) return; |
| 153 | 153 | |
| 154 | +#if 0 | |
| 154 | 155 | /* If the Fossil executable is more recent than If-Modified-Since, |
| 155 | 156 | ** go ahead and regenerate the resource. */ |
| 156 | 157 | exeMtime = file_mtime(g.nameOfExe, ExtFILE); |
| 157 | 158 | if( exeMtime>x ) return; |
| 159 | +#endif | |
| 158 | 160 | |
| 159 | 161 | /* If we reach this point, it means that the resource has not changed |
| 160 | 162 | ** and that we should generate a 304 Not Modified reply */ |
| 161 | 163 | cgi_reset_content(); |
| 162 | 164 | cgi_set_status(304, "Not Modified"); |
| 163 | 165 |
| --- 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 |