Code Coverage: vinyl-cache/include/tbl/http_headers.h
 
82217aa4fc7094b3610340078afaf78cd95a8ec9
 
0
/*-
1
 * Copyright (c) 2006 Verdens Gang AS
2
 * Copyright (c) 2006-2010 Varnish Software AS
3
 * All rights reserved.
4
 *
5
 * Author: Poul-Henning Kamp <phk@phk.freebsd.dk>
6
 *
7
 * SPDX-License-Identifier: BSD-2-Clause
8
 *
9
 * Redistribution and use in source and binary forms, with or without
10
 * modification, are permitted provided that the following conditions
11
 * are met:
12
 * 1. Redistributions of source code must retain the above copyright
13
 *    notice, this list of conditions and the following disclaimer.
14
 * 2. Redistributions in binary form must reproduce the above copyright
15
 *    notice, this list of conditions and the following disclaimer in the
16
 *    documentation and/or other materials provided with the distribution.
17
 *
18
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
19
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21
 * ARE DISCLAIMED.  IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
22
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28
 * SUCH DAMAGE.
29
 *
30
 * Argument list:
31
 * ---------------------------------------
32
 * a    Http header name
33
 * b    enum name
34
 * c    Suppress header in filter ops
35
 *
36
 * see [RFC2616 13.5.1 End-to-end and Hop-by-hop Headers]
37
 *
38
 * When fields with non-zero flags are added, the "perfect hash" at the
39
 * top of cache_http.c will need to be reworked.  See the comments there
40
 * for instructions.
41
 */
42
43
/*lint -save -e525 -e539 */
44
45
/* Shorthand for this file only, to keep table narrow */
46
47
#if defined(P) || defined(F) || defined(I) || defined(H) || defined(S) || \
48
    defined(K)
49
#error "Macro overloading"  // Trust but verify
50
#endif
51
52 1026
#define P HTTPH_R_PASS
53 1026
#define F HTTPH_R_FETCH
54 1026
#define I HTTPH_A_INS
55 1026
#define S HTTPH_A_PASS
56 1026
#define K HTTPH_C_SPECIFIC
57 53352
#define H(s,e,f) HTTPH(s, e, f)
58
59 1026
H("Accept",             H_Accept,               0        )      // 2616 14.1
60 1026
H("Accept-Charset",     H_Accept_Charset,       0        )      // 2616 14.2
61 1026
H("Accept-Encoding",    H_Accept_Encoding,      0        )      // 2616 14.3
62 1026
H("Accept-Language",    H_Accept_Language,      0        )      // 2616 14.4
63 1026
H("Accept-Ranges",      H_Accept_Ranges,        P|F|I    )      // 2616 14.5
64 1026
H("Age",                H_Age,                      I|S  )      // 2616 14.6
65 1026
H("Allow",              H_Allow,                0        )      // 2616 14.7
66 1026
H("Authorization",      H_Authorization,        0        )      // 2616 14.8
67 1026
H("Cache-Control",      H_Cache_Control,          F      )      // 2616 14.9
68 1026
H("Connection",         H_Connection,           P|F|I|S|K)      // 2616 14.10
69 1026
H("Content-Encoding",   H_Content_Encoding,     0        )      // 2616 14.11
70 1026
H("Content-Language",   H_Content_Language,     0        )      // 2616 14.12
71 1026
H("Content-Length",     H_Content_Length,       0        )      // 2616 14.13
72 1026
H("Content-Location",   H_Content_Location,     0        )      // 2616 14.14
73 1026
H("Content-MD5",        H_Content_MD5,          0        )      // 2616 14.15
74 1026
H("Content-Range",      H_Content_Range,          F|I    )      // 2616 14.16
75 1026
H("Content-Type",       H_Content_Type,         0        )      // 2616 14.17
76 1026
H("Cookie",             H_Cookie,               0        )      // 6265 4.2
77 1026
H("Date",               H_Date,                 0        )      // 2616 14.18
78 1026
H("ETag",               H_ETag,                 0        )      // 2616 14.19
79 1026
H("Expect",             H_Expect,               0        )      // 2616 14.20
80 1026
H("Expires",            H_Expires,              0        )      // 2616 14.21
81 1026
H("From",               H_From,                 0        )      // 2616 14.22
82 1026
H("Host",               H_Host,                 0        )      // 2616 14.23
83 1026
H("HTTP2-Settings",     H_HTTP2_Settings,       P|F|I|S|K)      // 7540 3.2.1
84 1026
H("If-Match",           H_If_Match,               F      )      // 2616 14.24
85 1026
H("If-Modified-Since",  H_If_Modified_Since,      F      )      // 2616 14.25
86 1026
H("If-None-Match",      H_If_None_Match,          F      )      // 2616 14.26
87 1026
H("If-Range",           H_If_Range,               F      )      // 2616 14.27
88 1026
H("If-Unmodified-Since",H_If_Unmodified_Since,    F      )      // 2616 14.28
89 1026
H("Keep-Alive",         H_Keep_Alive,           P|F|I|S|K)      // 2616 13.5.1
90 1026
H("Last-Modified",      H_Last_Modified,        0        )      // 2616 14.29
91 1026
H("Location",           H_Location,             0        )      // 2616 14.30
92 1026
H("Max-Forwards",       H_Max_Forwards,         0        )      // 2616 14.31
93 1026
H("Pragma",             H_Pragma,               0        )      // 2616 14.32
94 1026
H("Proxy-Authenticate", H_Proxy_Authenticate,     F|I    )      // 2616 14.33
95 1026
H("Proxy-Authorization",H_Proxy_Authorization,    F|I    )      // 2616 14.34
96 1026
H("Range",              H_Range,                  F|I    )      // 2616 14.35
97 1026
H("Referer",            H_Referer,              0        )      // 2616 14.36
98 1026
H("Retry-After",        H_Retry_After,          0        )      // 2616 14.37
99 1026
H("Server",             H_Server,               0        )      // 2616 14.38
100 1026
H("Set-Cookie",         H_Set_Cookie,           0        )      // 6265 4.1
101 1026
H("TE",                 H_TE,                   P|F|I|S  )      // 2616 14.39
102 1026
H("Trailer",            H_Trailer,              P|F|I|S  )      // 2616 14.40
103 1026
H("Transfer-Encoding",  H_Transfer_Encoding,    P|F|I|S|K)      // 2616 14.41
104 1026
H("Upgrade",            H_Upgrade,              P|F|I|S|K)      // 2616 14.42
105 1026
H("User-Agent",         H_User_Agent,           0        )      // 2616 14.43
106 1026
H("Vary",               H_Vary,                 0        )      // 2616 14.44
107 1026
H("Via",                H_Via,                  0        )      // 2616 14.45
108 1026
H("Warning",            H_Warning,              0        )      // 2616 14.46
109 1026
H("WWW-Authenticate",   H_WWW_Authenticate,     0        )      // 2616 14.47
110 1026
H("X-Forwarded-For",    H_X_Forwarded_For,      0        )      // No RFC
111
112 1026
#undef P
113 1026
#undef F
114 1026
#undef I
115 1026
#undef S
116 1026
#undef K
117 1026
#undef H
118 1026
#undef HTTPH
119
120
/*lint -restore */