Fossil SCM
Avoid returning empty ETag: headers in the HTTP reply.
Commit
261052c4e1c904dafe838b8660c56a73d97b6a9b8e8ff1baf4df0e6df38d4e2a
Parent
6fd34c57747279f…
1 file changed
+1
-1
+1
-1
| --- src/cgi.c | ||
| +++ src/cgi.c | ||
| @@ -293,11 +293,11 @@ | ||
| 293 | 293 | } |
| 294 | 294 | if( g.isConst ){ |
| 295 | 295 | /* isConst means that the reply is guaranteed to be invariant, even |
| 296 | 296 | ** after configuration changes and/or Fossil binary recompiles. */ |
| 297 | 297 | fprintf(g.httpOut, "Cache-Control: max-age=31536000\r\n"); |
| 298 | - }else if( etag_tag()!=0 ){ | |
| 298 | + }else if( etag_tag()[0]!=0 ){ | |
| 299 | 299 | fprintf(g.httpOut, "ETag: %s\r\n", etag_tag()); |
| 300 | 300 | fprintf(g.httpOut, "Cache-Control: max-age=%d\r\n", etag_maxage()); |
| 301 | 301 | }else{ |
| 302 | 302 | fprintf(g.httpOut, "Cache-control: no-cache\r\n"); |
| 303 | 303 | } |
| 304 | 304 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -293,11 +293,11 @@ | |
| 293 | } |
| 294 | if( g.isConst ){ |
| 295 | /* isConst means that the reply is guaranteed to be invariant, even |
| 296 | ** after configuration changes and/or Fossil binary recompiles. */ |
| 297 | fprintf(g.httpOut, "Cache-Control: max-age=31536000\r\n"); |
| 298 | }else if( etag_tag()!=0 ){ |
| 299 | fprintf(g.httpOut, "ETag: %s\r\n", etag_tag()); |
| 300 | fprintf(g.httpOut, "Cache-Control: max-age=%d\r\n", etag_maxage()); |
| 301 | }else{ |
| 302 | fprintf(g.httpOut, "Cache-control: no-cache\r\n"); |
| 303 | } |
| 304 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -293,11 +293,11 @@ | |
| 293 | } |
| 294 | if( g.isConst ){ |
| 295 | /* isConst means that the reply is guaranteed to be invariant, even |
| 296 | ** after configuration changes and/or Fossil binary recompiles. */ |
| 297 | fprintf(g.httpOut, "Cache-Control: max-age=31536000\r\n"); |
| 298 | }else if( etag_tag()[0]!=0 ){ |
| 299 | fprintf(g.httpOut, "ETag: %s\r\n", etag_tag()); |
| 300 | fprintf(g.httpOut, "Cache-Control: max-age=%d\r\n", etag_maxage()); |
| 301 | }else{ |
| 302 | fprintf(g.httpOut, "Cache-control: no-cache\r\n"); |
| 303 | } |
| 304 |