1 /* 2 * http_etag - HTTP ETag manipulation 3 * 4 * Copyright(c) 2015,2020 Glenn Strauss gstrauss()gluelogic.com All rights reserved 5 * License: BSD 3-clause (same as lighttpd) 6 */ 7 #ifndef INCLUDED_HTTP_ETAG_H 8 #define INCLUDED_HTTP_ETAG_H 9 #include "first.h" 10 11 #include "buffer.h" 12 13 #ifdef _AIX 14 #include <sys/stat.h> 15 #else 16 struct stat; /* declaration */ 17 #endif 18 19 typedef enum { ETAG_USE_INODE = 1, ETAG_USE_MTIME = 2, ETAG_USE_SIZE = 4 } etag_flags_t; 20 21 __attribute_pure__ 22 int http_etag_matches (const buffer *etag, const char *matches, int weak_ok); 23 24 void http_etag_create (buffer *etag, const struct stat *st, int flags); 25 26 27 #endif 28