Code Coverage: vinyl-cache/include/tbl/vsl_tags_http.h
 
82217aa4fc7094b3610340078afaf78cd95a8ec9
 
0
/*-
1
 * Copyright (c) 2012 Varnish Software AS
2
 * All rights reserved.
3
 *
4
 * Author: Poul-Henning Kamp <phk@phk.freebsd.dk>
5
 *
6
 * SPDX-License-Identifier: BSD-2-Clause
7
 *
8
 * Redistribution and use in source and binary forms, with or without
9
 * modification, are permitted provided that the following conditions
10
 * are met:
11
 * 1. Redistributions of source code must retain the above copyright
12
 *    notice, this list of conditions and the following disclaimer.
13
 * 2. Redistributions in binary form must reproduce the above copyright
14
 *    notice, this list of conditions and the following disclaimer in the
15
 *    documentation and/or other materials provided with the distribution.
16
 *
17
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20
 * ARE DISCLAIMED.  IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
21
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27
 * SUCH DAMAGE.
28
 *
29
 * Define the VSL tags for HTTP protocol messages
30
 *
31
 * NB: The order of this table is not random, DO NOT RESORT.
32
 *
33
 * Specifically FIRST, UNSET and LOST entries must be last, in that order.
34
 *
35
 * See bin/vinyld/cache/cache_http.c::http_VSLH() for the other side.
36
 *
37
 * Arguments:
38
 *      Tag-Name
39
 *      struct http header index
40
 *      1 if this header is used in requests
41
 *      1 if this header is used in responses
42
 *      short description postfix
43
 *      long description (in RST "definition list" format)
44
 *
45
 */
46
47 5
#define HEADER_NOTICE \
48 5
    "NOTE: HTTP header fields are free form records and not strictly\n" \
49 5
    "made of 2 fields. Accessing a specific header with the prefix\n" \
50 5
    "notation helps treating the header value as a single string.\n\n"
51
52
/*lint -save -e525 -e539 -e835 */
53
54 5
SLTH(Method,    HTTP_HDR_METHOD,        1, 0, "method",
55 5
        "The HTTP request method used.\n\n"
56 5
)
57
58 5
SLTH(URL,       HTTP_HDR_URL,           1, 0, "URL",
59 5
        "The HTTP request URL.\n\n"
60 5
)
61
62 5
SLTH(Protocol,  HTTP_HDR_PROTO,         1, 1, "protocol",
63 5
        "The HTTP protocol version information.\n\n"
64 5
)
65
66 5
SLTH(Status,    HTTP_HDR_STATUS,        0, 1, "status",
67 5
        "The HTTP response status code.\n\n"
68 5
)
69
70 5
SLTH(Reason,    HTTP_HDR_REASON,        0, 1, "reason",
71 5
        "The HTTP response reason string.\n\n"
72 5
)
73
74 5
SLTH(Header,    HTTP_HDR_FIRST,         1, 1, "header",
75 5
        "HTTP header contents.\n\n"
76 5
        "The format is::\n\n"
77 5
        "\t%s: %s\n"
78 5
        "\t|   |\n"
79 5
        "\t|   +- Header value\n"
80 5
        "\t+----- Header name\n"
81 5
        "\n"
82 5
        HEADER_NOTICE
83 5
)
84
85 5
SLTH(Unset,     HTTP_HDR_UNSET,         1, 1, "unset header",
86 5
        "HTTP header contents.\n\n"
87 5
        "The format is::\n\n"
88 5
        "\t%s: %s\n"
89 5
        "\t|   |\n"
90 5
        "\t|   +- Header value\n"
91 5
        "\t+----- Header name\n"
92 5
        "\n"
93 5
        HEADER_NOTICE
94 5
)
95
96 5
SLTH(Lost,      HTTP_HDR_LOST,          0, 0, "lost header",
97 5
        ""
98 5
)
99
100 5
#undef HEADER_NOTICE
101 5
#undef SLTH
102
103
/*lint -restore */