diff options
-rw-r--r-- | cqrlogo.c | 4 | ||||
-rw-r--r-- | cqrlogo.h | 1 | ||||
-rw-r--r-- | lib/libcqrlogo.h | 1 |
3 files changed, 6 insertions, 0 deletions
@@ -17,6 +17,7 @@ int main(int argc, char **argv) { regex_t preg; regmatch_t pmatch[1]; uint8_t https; + struct timeval tv; struct cqr_png * png; struct cqr_bitmap * bitmap; @@ -104,7 +105,10 @@ int main(int argc, char **argv) { /* print HTTP header */ fputs(CQR_HEADER_CONTENT_TYPE, stdout); fputs(CQR_HEADER_CONTENT_DISPOSITION, stdout); + fputs(CQR_HEADER_CACHE_CONTROL, stdout); fputs(CQR_HEADER_PRAGMA, stdout); + gettimeofday(&tv, NULL); + fprintf(stdout, "ETag: %lu%lu\n", tv.tv_sec, tv.tv_usec); fputc('\n', stdout); /* write PNG data to stdout */ @@ -16,6 +16,7 @@ #include <inttypes.h> #include <regex.h> #include <stdbool.h> +#include <sys/time.h> #if HAVE_FCGI #include <fcgi_stdio.h> diff --git a/lib/libcqrlogo.h b/lib/libcqrlogo.h index eb945b1..73ce149 100644 --- a/lib/libcqrlogo.h +++ b/lib/libcqrlogo.h @@ -42,6 +42,7 @@ struct cqr_conf { bool overwrite; }; +#define CQR_HEADER_CACHE_CONTROL "Cache-Control: no-cache\nCache-Control: max-age=0\n" #define CQR_HEADER_CONTENT_TYPE "Content-Type: image/png\n" #define CQR_HEADER_CONTENT_DISPOSITION "Content-Disposition: inline; filename=\"cqrlogo.png\"\n" #define CQR_HEADER_PRAGMA "Pragma: no-cache\n" |