Fossil

Check-in [261052c4e1]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Avoid returning empty ETag: headers in the HTTP reply.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 261052c4e1c904dafe838b8660c56a73d97b6a9b8e8ff1baf4df0e6df38d4e2a
User & Date: drh 2020-05-10 11:39:32.701
Context
2020-05-10
12:16
Enable ETag caching of the /uvlist and /juvlist pages. ... (check-in: a6003f1df0 user: drh tags: trunk)
11:39
Avoid returning empty ETag: headers in the HTTP reply. ... (check-in: 261052c4e1 user: drh tags: trunk)
04:50
File Browser: use wording 'file at check-in' to denote a file version snapshot and 'known file' to denote a name of a managed file. ... (check-in: 6fd34c5774 user: ashepilko tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/cgi.c.
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
    assert( rangeEnd==0 );
    fprintf(g.httpOut, "Status: %d %s\r\n", iReplyStatus, zReplyStatus);
  }
  if( g.isConst ){
    /* isConst means that the reply is guaranteed to be invariant, even
    ** after configuration changes and/or Fossil binary recompiles. */
    fprintf(g.httpOut, "Cache-Control: max-age=31536000\r\n");
  }else if( etag_tag()!=0 ){
    fprintf(g.httpOut, "ETag: %s\r\n", etag_tag());
    fprintf(g.httpOut, "Cache-Control: max-age=%d\r\n", etag_maxage());
  }else{
    fprintf(g.httpOut, "Cache-control: no-cache\r\n");
  }
  if( etag_mtime()>0 ){
    fprintf(g.httpOut, "Last-Modified: %s\r\n",







|







291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
    assert( rangeEnd==0 );
    fprintf(g.httpOut, "Status: %d %s\r\n", iReplyStatus, zReplyStatus);
  }
  if( g.isConst ){
    /* isConst means that the reply is guaranteed to be invariant, even
    ** after configuration changes and/or Fossil binary recompiles. */
    fprintf(g.httpOut, "Cache-Control: max-age=31536000\r\n");
  }else if( etag_tag()[0]!=0 ){
    fprintf(g.httpOut, "ETag: %s\r\n", etag_tag());
    fprintf(g.httpOut, "Cache-Control: max-age=%d\r\n", etag_maxage());
  }else{
    fprintf(g.httpOut, "Cache-control: no-cache\r\n");
  }
  if( etag_mtime()>0 ){
    fprintf(g.httpOut, "Last-Modified: %s\r\n",