Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Correctly terminate the 304 replies in the previous check-in. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
9f99257451fb91733d1fefbf71e7850f |
| User & Date: | drh 2020-05-09 21:04:49.129 |
Context
|
2020-05-09
| ||
| 21:10 | Another 304 change: Omit only the Content-Type header. Retain the cache-control header lines. ... (check-in: fff9b6799c user: drh tags: trunk) | |
| 21:04 | Correctly terminate the 304 replies in the previous check-in. ... (check-in: 9f99257451 user: drh tags: trunk) | |
| 20:59 | For a 304 HTTP response, omit extraneous fields such as Content-Type and ETag. ... (check-in: 6624350b0e user: drh tags: trunk) | |
Changes
Changes to src/cgi.c.
| ︙ | ︙ | |||
287 288 289 290 291 292 293 |
fprintf(g.httpOut, "Date: %s\r\n", cgi_rfc822_datestamp(time(0)));
fprintf(g.httpOut, "Connection: close\r\n");
fprintf(g.httpOut, "X-UA-Compatible: IE=edge\r\n");
}else{
assert( rangeEnd==0 );
fprintf(g.httpOut, "Status: %d %s\r\n", iReplyStatus, zReplyStatus);
}
| | > > > | 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 |
fprintf(g.httpOut, "Date: %s\r\n", cgi_rfc822_datestamp(time(0)));
fprintf(g.httpOut, "Connection: close\r\n");
fprintf(g.httpOut, "X-UA-Compatible: IE=edge\r\n");
}else{
assert( rangeEnd==0 );
fprintf(g.httpOut, "Status: %d %s\r\n", iReplyStatus, zReplyStatus);
}
if( iReplyStatus==304 ){
fprintf(g.httpOut, "\r\n");
goto finish_cgi_reply;
}
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());
|
| ︙ | ︙ |