summaryrefslogtreecommitdiff
path: root/src/http_etag.h
blob: 5088607ceeb1f138074c16508aa44091463d6b55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/*
 * http_etag - HTTP ETag manipulation
 *
 * Copyright(c) 2015,2020 Glenn Strauss gstrauss()gluelogic.com  All rights reserved
 * License: BSD 3-clause (same as lighttpd)
 */
#ifndef INCLUDED_HTTP_ETAG_H
#define INCLUDED_HTTP_ETAG_H
#include "first.h"

#include "buffer.h"

#if defined(_AIX) || defined(_WIN32)
#include "sys-stat.h"
#else
struct stat;            /* declaration */
#endif

typedef enum { ETAG_USE_INODE = 1, ETAG_USE_MTIME = 2, ETAG_USE_SIZE = 4 } etag_flags_t;

__attribute_pure__
int http_etag_matches (const buffer *etag, const char *matches, int weak_ok);

void http_etag_create (buffer *etag, const struct stat *st, int flags);


#endif