Coverage Report

Created: 2026-08-31 07:20

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/h2o/include/h2o/string_.h
Line
Count
Source
1
/*
2
 * Copyright (c) 2014,2015 DeNA Co., Ltd., Kazuho Oku, Justin Zhu
3
 *
4
 * Permission is hereby granted, free of charge, to any person obtaining a copy
5
 * of this software and associated documentation files (the "Software"), to
6
 * deal in the Software without restriction, including without limitation the
7
 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
8
 * sell copies of the Software, and to permit persons to whom the Software is
9
 * furnished to do so, subject to the following conditions:
10
 *
11
 * The above copyright notice and this permission notice shall be included in
12
 * all copies or substantial portions of the Software.
13
 *
14
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20
 * IN THE SOFTWARE.
21
 */
22
#ifndef h2o__string_h
23
#define h2o__string_h
24
25
#ifdef __cplusplus
26
extern "C" {
27
#endif
28
29
#include <stddef.h>
30
#include <stdint.h>
31
#include <time.h>
32
#include "h2o/memory.h"
33
34
288k
#define H2O_STRLIT(s) (s), sizeof(s) - 1
35
36
#define H2O_INT8_LONGEST_STR "-127"
37
0
#define H2O_UINT8_LONGEST_STR "255"
38
0
#define H2O_INT16_LONGEST_STR "-32768"
39
0
#define H2O_UINT16_LONGEST_STR "65535"
40
#define H2O_INT32_LONGEST_STR "-2147483648"
41
#define H2O_UINT32_LONGEST_STR "4294967295"
42
#define H2O_INT64_LONGEST_STR "-9223372036854775808"
43
17.5k
#define H2O_UINT64_LONGEST_STR "18446744073709551615"
44
#define H2O_UINT64_LONGEST_HEX_STR "FFFFFFFFFFFFFFFF"
45
46
#define H2O_SIZE_T_LONGEST_STR                                                                                                     \
47
7.65k
    H2O_UINT64_LONGEST_STR /* As it is hard to define a macro based on the actual size of size_t, we hard-code it to 64-bits and   \
48
                              assert that in string.c */
49
50
/**
51
 * duplicates given string
52
 * @param pool memory pool (or NULL to use malloc)
53
 * @param s source string
54
 * @param len length of the source string (the result of strlen(s) used in case len is SIZE_MAX)
55
 * @return buffer pointing to the duplicated string (buf is NUL-terminated but the length does not include the NUL char)
56
 */
57
h2o_iovec_t h2o_strdup(h2o_mem_pool_t *pool, const char *s, size_t len);
58
/**
59
 * variant of h2o_strdup that calls h2o_mem_alloc_shared
60
 */
61
h2o_iovec_t h2o_strdup_shared(h2o_mem_pool_t *pool, const char *s, size_t len);
62
/**
63
 * duplicates given string appending '/' to the tail if not found
64
 */
65
h2o_iovec_t h2o_strdup_slashed(h2o_mem_pool_t *pool, const char *s, size_t len);
66
/**
67
 * tr/A-Z/a-z/
68
 */
69
static int h2o_tolower(int ch);
70
/**
71
 * tr/A-Z/a-z/
72
 */
73
static void h2o_strtolower(char *s, size_t len);
74
/**
75
 * copies and converts the string to lower-case
76
 */
77
static void h2o_strcopytolower(char *d, const char *s, size_t len);
78
/**
79
 * tr/a-z/A-Z/
80
 */
81
static int h2o_toupper(int ch);
82
/**
83
 * tr/a-z/A-Z/
84
 */
85
static void h2o_strtoupper(char *s, size_t len);
86
/**
87
 * tests if target string (target_len bytes long) is equal to test string (test_len bytes long) after being converted to lower-case
88
 */
89
static int h2o_lcstris(const char *target, size_t target_len, const char *test, size_t test_len);
90
/**
91
 * turns the length of a string into the length of the same string encoded in base64
92
 */
93
static size_t h2o_base64_encode_capacity(size_t len);
94
/**
95
 * parses a positive number of return SIZE_MAX if failed
96
 */
97
size_t h2o_strtosize(const char *s, size_t len);
98
/**
99
 * parses first positive number contained in *s or return SIZE_MAX if failed.
100
 * *s will set to right after the number in string or right after the end of string.
101
 */
102
size_t h2o_strtosizefwd(char **s, size_t len);
103
/**
104
 * base64 url decoder
105
 */
106
h2o_iovec_t h2o_decode_base64url(h2o_mem_pool_t *pool, const char *src, size_t len);
107
/**
108
 * base64 encoder (note: the function emits trailing '\0')
109
 */
110
size_t h2o_base64_encode(char *dst, const void *src, size_t len, int url_encoded);
111
/**
112
 * decodes hexadecimal string
113
 */
114
int h2o_hex_decode(void *dst, const char *src, size_t src_len);
115
/**
116
 * encodes binary into a hexadecimal string (with '\0' appended at last)
117
 */
118
void h2o_hex_encode(char *dst, const void *src, size_t src_len);
119
/**
120
 * URI-escapes given string (as defined in RFC 3986)
121
 * @param pool memory pool or NULL to allocate memory using malloc
122
 * @return an encoded string which is NULL-terminated (NULL does not count as part of `.len`)
123
 */
124
h2o_iovec_t h2o_uri_escape(h2o_mem_pool_t *pool, const char *s, size_t l, const char *preserve_chars);
125
/**
126
 * decodes a percent-encoded string (RFC 3986 Section 2.1)
127
 * @param pool memory pool or NULL to allocate memory using malloc
128
 * @param s source string
129
 * @param l length of source string
130
 * @return a decoded string which is NULL-terminated (NULL does not count as part of `.len`), or {NULL, 0} if failed
131
 */
132
h2o_iovec_t h2o_uri_unescape(h2o_mem_pool_t *pool, const char *s, size_t l);
133
/**
134
 * returns the extension portion of path
135
 */
136
h2o_iovec_t h2o_get_filext(const char *path, size_t len);
137
/**
138
 * returns a vector with surrounding WS stripped
139
 */
140
h2o_iovec_t h2o_str_stripws(const char *s, size_t len);
141
/**
142
 * returns the offset of given substring or SIZE_MAX if not found
143
 */
144
size_t h2o_strstr(const char *haysack, size_t haysack_len, const char *needle, size_t needle_len);
145
/**
146
 * Parses a string into tokens or name-value pairs. Each token is returned as a tuple of (returned_pointer, *element_len). When the
147
 * input is fully consumed, NULL is returned. See t/00unit/lib/common/string.c for examples.
148
 *
149
 * @param iter   Iterator. When calling the function for the first time, this vector should point to the entire string to be parsed.
150
 * @param inner  Separator to separate tokens.
151
 * @param outer  The outer separator. When parsing a flat list, the values of `inner` and `outer` should be identical. When parsing
152
 *               a nested list, this value specifies the outer separator.  For example, (inner, outer) would be set to (';', ',')
153
 *               when parsing a Cache-Control header field value. In such case, boundary of sublists is signaled to the caller by
154
 *               returning a token pointing to the outer separator.
155
 * @param value  [optional] When a non-NULL address is given and if the found element contains `=`, that element is split into a
156
 *               name-value pair and the range of the value is returned using this parameter. The name is returned as the token.
157
 */
158
const char *h2o_next_token(h2o_iovec_t *iter, int inner, int outer, size_t *element_len, h2o_iovec_t *value);
159
/**
160
 * tests if string needle exists within a separator-separated string (for handling "#rule" of RFC 2616)
161
 */
162
int h2o_contains_token(const char *haysack, size_t haysack_len, const char *needle, size_t needle_len, int separator);
163
/**
164
 * HTML-escapes a string
165
 * @param pool memory pool
166
 * @param src source string
167
 * @param len source length
168
 * @return the escaped string, or the source itself if escape was not necessary
169
 */
170
h2o_iovec_t h2o_htmlescape(h2o_mem_pool_t *pool, const char *src, size_t len);
171
/**
172
 * concatenates a list of iovecs (with NUL termination)
173
 */
174
#define h2o_concat(pool, ...)                                                                                                      \
175
3.99k
    h2o_concat_list(pool, (h2o_iovec_t[]){__VA_ARGS__}, sizeof((h2o_iovec_t[]){__VA_ARGS__}) / sizeof(h2o_iovec_t))
176
h2o_iovec_t h2o_concat_list(h2o_mem_pool_t *pool, h2o_iovec_t *list, size_t count);
177
/**
178
 * joins the separated strings of iovecs into a single iovec
179
 */
180
h2o_iovec_t h2o_join_list(h2o_mem_pool_t *pool, h2o_iovec_t *list, size_t count, h2o_iovec_t delimiter);
181
/**
182
 * splits the string str into a list of iovec
183
 */
184
void h2o_split(h2o_mem_pool_t *pool, h2o_iovec_vector_t *list, h2o_iovec_t str, const char needle);
185
/**
186
 * emits a two-line string to buf that graphically points to given location within the source string
187
 * @return 0 if successful
188
 */
189
int h2o_str_at_position(char *buf, const char *src, size_t src_len, int lineno, int column);
190
191
int h2o__lcstris_core(const char *target, const char *test, size_t test_len);
192
193
/**
194
 * Encode a Structured Field Value [RFC 8941] of type String ("sf-string" in the RFC)
195
 * @param pool memory pool (or NULL to use malloc)
196
 * @param s source string
197
 * @param slen length of source string; if slen==SIZE_MAX, then strlen(s) will be used
198
 * @return buffer pointing to the encoded string (buf is NUL-terminated but the length does not include the NUL char)
199
 */
200
h2o_iovec_t h2o_encode_sf_string(h2o_mem_pool_t *pool, const char *s, size_t slen);
201
202
/* inline defs */
203
204
inline int h2o_tolower(int ch)
205
822k
{
206
822k
    return 'A' <= ch && ch <= 'Z' ? ch + 0x20 : ch;
207
822k
}
Unexecuted instantiation: driver.cc:h2o_tolower(int)
Unexecuted instantiation: driver_common.cc:h2o_tolower(int)
Unexecuted instantiation: multithread.c:h2o_tolower
Unexecuted instantiation: socket.c:h2o_tolower
Unexecuted instantiation: socketpool.c:h2o_tolower
string.c:h2o_tolower
Line
Count
Source
205
47.0k
{
206
47.0k
    return 'A' <= ch && ch <= 'Z' ? ch + 0x20 : ch;
207
47.0k
}
Unexecuted instantiation: token.c:h2o_tolower
Unexecuted instantiation: url.c:h2o_tolower
Unexecuted instantiation: roundrobin.c:h2o_tolower
config.c:h2o_tolower
Line
Count
Source
205
8.19k
{
206
8.19k
    return 'A' <= ch && ch <= 'Z' ? ch + 0x20 : ch;
207
8.19k
}
Unexecuted instantiation: configurator.c:h2o_tolower
Unexecuted instantiation: context.c:h2o_tolower
Unexecuted instantiation: headers.c:h2o_tolower
Unexecuted instantiation: request.c:h2o_tolower
Unexecuted instantiation: util.c:h2o_tolower
Unexecuted instantiation: access_log.c:h2o_tolower
Unexecuted instantiation: file.c:h2o_tolower
mimemap.c:h2o_tolower
Line
Count
Source
205
11.4k
{
206
11.4k
    return 'A' <= ch && ch <= 'Z' ? ch + 0x20 : ch;
207
11.4k
}
Unexecuted instantiation: proxy.c:h2o_tolower
http1.c:h2o_tolower
Line
Count
Source
205
721k
{
206
721k
    return 'A' <= ch && ch <= 'Z' ? ch + 0x20 : ch;
207
721k
}
Unexecuted instantiation: connection.c:h2o_tolower
Unexecuted instantiation: frame.c:h2o_tolower
Unexecuted instantiation: hpack.c:h2o_tolower
Unexecuted instantiation: scheduler.c:h2o_tolower
Unexecuted instantiation: stream.c:h2o_tolower
Unexecuted instantiation: http2_debug_state.c:h2o_tolower
Unexecuted instantiation: common.c:h2o_tolower
Unexecuted instantiation: server.c:h2o_tolower
Unexecuted instantiation: cache.c:h2o_tolower
Unexecuted instantiation: hostinfo.c:h2o_tolower
Unexecuted instantiation: http3client.c:h2o_tolower
Unexecuted instantiation: httpclient.c:h2o_tolower
Unexecuted instantiation: memcached.c:h2o_tolower
Unexecuted instantiation: redis.c:h2o_tolower
Unexecuted instantiation: serverutil.c:h2o_tolower
Unexecuted instantiation: rand.c:h2o_tolower
Unexecuted instantiation: absprio.c:h2o_tolower
Unexecuted instantiation: logconf.c:h2o_tolower
Unexecuted instantiation: compress.c:h2o_tolower
Unexecuted instantiation: gzip.c:h2o_tolower
Unexecuted instantiation: headers_util.c:h2o_tolower
Unexecuted instantiation: cache_digests.c:h2o_tolower
Unexecuted instantiation: casper.c:h2o_tolower
Unexecuted instantiation: qpack.c:h2o_tolower
http1client.c:h2o_tolower
Line
Count
Source
205
33.5k
{
206
33.5k
    return 'A' <= ch && ch <= 'Z' ? ch + 0x20 : ch;
207
33.5k
}
Unexecuted instantiation: http2client.c:h2o_tolower
Unexecuted instantiation: pipe_sender.c:h2o_tolower
Unexecuted instantiation: driver_url.cc:h2o_tolower(int)
Unexecuted instantiation: driver_h3.cc:h2o_tolower(int)
Unexecuted instantiation: least_conn.c:h2o_tolower
Unexecuted instantiation: errordoc.c:h2o_tolower
Unexecuted instantiation: expires.c:h2o_tolower
Unexecuted instantiation: fastcgi.c:h2o_tolower
Unexecuted instantiation: h2olog.c:h2o_tolower
Unexecuted instantiation: connect.c:h2o_tolower
Unexecuted instantiation: redirect.c:h2o_tolower
Unexecuted instantiation: reproxy.c:h2o_tolower
Unexecuted instantiation: throttle_resp.c:h2o_tolower
Unexecuted instantiation: self_trace.c:h2o_tolower
Unexecuted instantiation: server_timing.c:h2o_tolower
Unexecuted instantiation: status.c:h2o_tolower
Unexecuted instantiation: events.c:h2o_tolower
Unexecuted instantiation: memory.c:h2o_tolower
Unexecuted instantiation: requests.c:h2o_tolower
Unexecuted instantiation: ssl.c:h2o_tolower
Unexecuted instantiation: durations.c:h2o_tolower
208
209
inline void h2o_strtolower(char *s, size_t len)
210
59.1k
{
211
59.1k
    h2o_strcopytolower(s, s, len);
212
59.1k
}
Unexecuted instantiation: driver.cc:h2o_strtolower(char*, unsigned long)
Unexecuted instantiation: driver_common.cc:h2o_strtolower(char*, unsigned long)
Unexecuted instantiation: multithread.c:h2o_strtolower
Unexecuted instantiation: socket.c:h2o_strtolower
Unexecuted instantiation: socketpool.c:h2o_strtolower
Unexecuted instantiation: string.c:h2o_strtolower
Unexecuted instantiation: token.c:h2o_strtolower
Unexecuted instantiation: url.c:h2o_strtolower
Unexecuted instantiation: roundrobin.c:h2o_strtolower
config.c:h2o_strtolower
Line
Count
Source
210
3
{
211
3
    h2o_strcopytolower(s, s, len);
212
3
}
Unexecuted instantiation: configurator.c:h2o_strtolower
Unexecuted instantiation: context.c:h2o_strtolower
Unexecuted instantiation: headers.c:h2o_strtolower
Unexecuted instantiation: request.c:h2o_strtolower
Unexecuted instantiation: util.c:h2o_strtolower
Unexecuted instantiation: access_log.c:h2o_strtolower
Unexecuted instantiation: file.c:h2o_strtolower
Unexecuted instantiation: mimemap.c:h2o_strtolower
Unexecuted instantiation: proxy.c:h2o_strtolower
http1.c:h2o_strtolower
Line
Count
Source
210
55.7k
{
211
55.7k
    h2o_strcopytolower(s, s, len);
212
55.7k
}
Unexecuted instantiation: connection.c:h2o_strtolower
Unexecuted instantiation: frame.c:h2o_strtolower
Unexecuted instantiation: hpack.c:h2o_strtolower
Unexecuted instantiation: scheduler.c:h2o_strtolower
Unexecuted instantiation: stream.c:h2o_strtolower
Unexecuted instantiation: http2_debug_state.c:h2o_strtolower
Unexecuted instantiation: common.c:h2o_strtolower
Unexecuted instantiation: server.c:h2o_strtolower
Unexecuted instantiation: cache.c:h2o_strtolower
Unexecuted instantiation: hostinfo.c:h2o_strtolower
Unexecuted instantiation: http3client.c:h2o_strtolower
Unexecuted instantiation: httpclient.c:h2o_strtolower
Unexecuted instantiation: memcached.c:h2o_strtolower
Unexecuted instantiation: redis.c:h2o_strtolower
Unexecuted instantiation: serverutil.c:h2o_strtolower
Unexecuted instantiation: rand.c:h2o_strtolower
Unexecuted instantiation: absprio.c:h2o_strtolower
Unexecuted instantiation: logconf.c:h2o_strtolower
Unexecuted instantiation: compress.c:h2o_strtolower
Unexecuted instantiation: gzip.c:h2o_strtolower
Unexecuted instantiation: headers_util.c:h2o_strtolower
Unexecuted instantiation: cache_digests.c:h2o_strtolower
Unexecuted instantiation: casper.c:h2o_strtolower
Unexecuted instantiation: qpack.c:h2o_strtolower
http1client.c:h2o_strtolower
Line
Count
Source
210
3.35k
{
211
3.35k
    h2o_strcopytolower(s, s, len);
212
3.35k
}
Unexecuted instantiation: http2client.c:h2o_strtolower
Unexecuted instantiation: pipe_sender.c:h2o_strtolower
Unexecuted instantiation: driver_url.cc:h2o_strtolower(char*, unsigned long)
Unexecuted instantiation: driver_h3.cc:h2o_strtolower(char*, unsigned long)
Unexecuted instantiation: least_conn.c:h2o_strtolower
Unexecuted instantiation: errordoc.c:h2o_strtolower
Unexecuted instantiation: expires.c:h2o_strtolower
Unexecuted instantiation: fastcgi.c:h2o_strtolower
Unexecuted instantiation: h2olog.c:h2o_strtolower
Unexecuted instantiation: connect.c:h2o_strtolower
Unexecuted instantiation: redirect.c:h2o_strtolower
Unexecuted instantiation: reproxy.c:h2o_strtolower
Unexecuted instantiation: throttle_resp.c:h2o_strtolower
Unexecuted instantiation: self_trace.c:h2o_strtolower
Unexecuted instantiation: server_timing.c:h2o_strtolower
Unexecuted instantiation: status.c:h2o_strtolower
Unexecuted instantiation: events.c:h2o_strtolower
Unexecuted instantiation: memory.c:h2o_strtolower
Unexecuted instantiation: requests.c:h2o_strtolower
Unexecuted instantiation: ssl.c:h2o_strtolower
Unexecuted instantiation: durations.c:h2o_strtolower
213
214
inline void h2o_strcopytolower(char *d, const char *s, size_t len)
215
59.1k
{
216
822k
    for (; len != 0; ++d, ++s, --len)
217
763k
        *d = h2o_tolower(*s);
218
59.1k
}
Unexecuted instantiation: driver.cc:h2o_strcopytolower(char*, char const*, unsigned long)
Unexecuted instantiation: driver_common.cc:h2o_strcopytolower(char*, char const*, unsigned long)
Unexecuted instantiation: multithread.c:h2o_strcopytolower
Unexecuted instantiation: socket.c:h2o_strcopytolower
Unexecuted instantiation: socketpool.c:h2o_strcopytolower
Unexecuted instantiation: string.c:h2o_strcopytolower
Unexecuted instantiation: token.c:h2o_strcopytolower
Unexecuted instantiation: url.c:h2o_strcopytolower
Unexecuted instantiation: roundrobin.c:h2o_strcopytolower
config.c:h2o_strcopytolower
Line
Count
Source
215
3
{
216
8.20k
    for (; len != 0; ++d, ++s, --len)
217
8.19k
        *d = h2o_tolower(*s);
218
3
}
Unexecuted instantiation: configurator.c:h2o_strcopytolower
Unexecuted instantiation: context.c:h2o_strcopytolower
Unexecuted instantiation: headers.c:h2o_strcopytolower
Unexecuted instantiation: request.c:h2o_strcopytolower
Unexecuted instantiation: util.c:h2o_strcopytolower
Unexecuted instantiation: access_log.c:h2o_strcopytolower
Unexecuted instantiation: file.c:h2o_strcopytolower
Unexecuted instantiation: mimemap.c:h2o_strcopytolower
Unexecuted instantiation: proxy.c:h2o_strcopytolower
http1.c:h2o_strcopytolower
Line
Count
Source
215
55.7k
{
216
777k
    for (; len != 0; ++d, ++s, --len)
217
721k
        *d = h2o_tolower(*s);
218
55.7k
}
Unexecuted instantiation: connection.c:h2o_strcopytolower
Unexecuted instantiation: frame.c:h2o_strcopytolower
Unexecuted instantiation: hpack.c:h2o_strcopytolower
Unexecuted instantiation: scheduler.c:h2o_strcopytolower
Unexecuted instantiation: stream.c:h2o_strcopytolower
Unexecuted instantiation: http2_debug_state.c:h2o_strcopytolower
Unexecuted instantiation: common.c:h2o_strcopytolower
Unexecuted instantiation: server.c:h2o_strcopytolower
Unexecuted instantiation: cache.c:h2o_strcopytolower
Unexecuted instantiation: hostinfo.c:h2o_strcopytolower
Unexecuted instantiation: http3client.c:h2o_strcopytolower
Unexecuted instantiation: httpclient.c:h2o_strcopytolower
Unexecuted instantiation: memcached.c:h2o_strcopytolower
Unexecuted instantiation: redis.c:h2o_strcopytolower
Unexecuted instantiation: serverutil.c:h2o_strcopytolower
Unexecuted instantiation: rand.c:h2o_strcopytolower
Unexecuted instantiation: absprio.c:h2o_strcopytolower
Unexecuted instantiation: logconf.c:h2o_strcopytolower
Unexecuted instantiation: compress.c:h2o_strcopytolower
Unexecuted instantiation: gzip.c:h2o_strcopytolower
Unexecuted instantiation: headers_util.c:h2o_strcopytolower
Unexecuted instantiation: cache_digests.c:h2o_strcopytolower
Unexecuted instantiation: casper.c:h2o_strcopytolower
Unexecuted instantiation: qpack.c:h2o_strcopytolower
http1client.c:h2o_strcopytolower
Line
Count
Source
215
3.35k
{
216
36.9k
    for (; len != 0; ++d, ++s, --len)
217
33.5k
        *d = h2o_tolower(*s);
218
3.35k
}
Unexecuted instantiation: http2client.c:h2o_strcopytolower
Unexecuted instantiation: pipe_sender.c:h2o_strcopytolower
Unexecuted instantiation: driver_url.cc:h2o_strcopytolower(char*, char const*, unsigned long)
Unexecuted instantiation: driver_h3.cc:h2o_strcopytolower(char*, char const*, unsigned long)
Unexecuted instantiation: least_conn.c:h2o_strcopytolower
Unexecuted instantiation: errordoc.c:h2o_strcopytolower
Unexecuted instantiation: expires.c:h2o_strcopytolower
Unexecuted instantiation: fastcgi.c:h2o_strcopytolower
Unexecuted instantiation: h2olog.c:h2o_strcopytolower
Unexecuted instantiation: connect.c:h2o_strcopytolower
Unexecuted instantiation: redirect.c:h2o_strcopytolower
Unexecuted instantiation: reproxy.c:h2o_strcopytolower
Unexecuted instantiation: throttle_resp.c:h2o_strcopytolower
Unexecuted instantiation: self_trace.c:h2o_strcopytolower
Unexecuted instantiation: server_timing.c:h2o_strcopytolower
Unexecuted instantiation: status.c:h2o_strcopytolower
Unexecuted instantiation: events.c:h2o_strcopytolower
Unexecuted instantiation: memory.c:h2o_strcopytolower
Unexecuted instantiation: requests.c:h2o_strcopytolower
Unexecuted instantiation: ssl.c:h2o_strcopytolower
Unexecuted instantiation: durations.c:h2o_strcopytolower
219
220
inline int h2o_toupper(int ch)
221
0
{
222
0
    return 'a' <= ch && ch <= 'z' ? ch - 0x20 : ch;
223
0
}
Unexecuted instantiation: driver.cc:h2o_toupper(int)
Unexecuted instantiation: driver_common.cc:h2o_toupper(int)
Unexecuted instantiation: multithread.c:h2o_toupper
Unexecuted instantiation: socket.c:h2o_toupper
Unexecuted instantiation: socketpool.c:h2o_toupper
Unexecuted instantiation: string.c:h2o_toupper
Unexecuted instantiation: token.c:h2o_toupper
Unexecuted instantiation: url.c:h2o_toupper
Unexecuted instantiation: roundrobin.c:h2o_toupper
Unexecuted instantiation: config.c:h2o_toupper
Unexecuted instantiation: configurator.c:h2o_toupper
Unexecuted instantiation: context.c:h2o_toupper
Unexecuted instantiation: headers.c:h2o_toupper
Unexecuted instantiation: request.c:h2o_toupper
Unexecuted instantiation: util.c:h2o_toupper
Unexecuted instantiation: access_log.c:h2o_toupper
Unexecuted instantiation: file.c:h2o_toupper
Unexecuted instantiation: mimemap.c:h2o_toupper
Unexecuted instantiation: proxy.c:h2o_toupper
Unexecuted instantiation: http1.c:h2o_toupper
Unexecuted instantiation: connection.c:h2o_toupper
Unexecuted instantiation: frame.c:h2o_toupper
Unexecuted instantiation: hpack.c:h2o_toupper
Unexecuted instantiation: scheduler.c:h2o_toupper
Unexecuted instantiation: stream.c:h2o_toupper
Unexecuted instantiation: http2_debug_state.c:h2o_toupper
Unexecuted instantiation: common.c:h2o_toupper
Unexecuted instantiation: server.c:h2o_toupper
Unexecuted instantiation: cache.c:h2o_toupper
Unexecuted instantiation: hostinfo.c:h2o_toupper
Unexecuted instantiation: http3client.c:h2o_toupper
Unexecuted instantiation: httpclient.c:h2o_toupper
Unexecuted instantiation: memcached.c:h2o_toupper
Unexecuted instantiation: redis.c:h2o_toupper
Unexecuted instantiation: serverutil.c:h2o_toupper
Unexecuted instantiation: rand.c:h2o_toupper
Unexecuted instantiation: absprio.c:h2o_toupper
Unexecuted instantiation: logconf.c:h2o_toupper
Unexecuted instantiation: compress.c:h2o_toupper
Unexecuted instantiation: gzip.c:h2o_toupper
Unexecuted instantiation: headers_util.c:h2o_toupper
Unexecuted instantiation: cache_digests.c:h2o_toupper
Unexecuted instantiation: casper.c:h2o_toupper
Unexecuted instantiation: qpack.c:h2o_toupper
Unexecuted instantiation: http1client.c:h2o_toupper
Unexecuted instantiation: http2client.c:h2o_toupper
Unexecuted instantiation: pipe_sender.c:h2o_toupper
Unexecuted instantiation: driver_url.cc:h2o_toupper(int)
Unexecuted instantiation: driver_h3.cc:h2o_toupper(int)
Unexecuted instantiation: least_conn.c:h2o_toupper
Unexecuted instantiation: errordoc.c:h2o_toupper
Unexecuted instantiation: expires.c:h2o_toupper
Unexecuted instantiation: fastcgi.c:h2o_toupper
Unexecuted instantiation: h2olog.c:h2o_toupper
Unexecuted instantiation: connect.c:h2o_toupper
Unexecuted instantiation: redirect.c:h2o_toupper
Unexecuted instantiation: reproxy.c:h2o_toupper
Unexecuted instantiation: throttle_resp.c:h2o_toupper
Unexecuted instantiation: self_trace.c:h2o_toupper
Unexecuted instantiation: server_timing.c:h2o_toupper
Unexecuted instantiation: status.c:h2o_toupper
Unexecuted instantiation: events.c:h2o_toupper
Unexecuted instantiation: memory.c:h2o_toupper
Unexecuted instantiation: requests.c:h2o_toupper
Unexecuted instantiation: ssl.c:h2o_toupper
Unexecuted instantiation: durations.c:h2o_toupper
224
225
inline void h2o_strtoupper(char *s, size_t len)
226
0
{
227
0
    for (; len != 0; ++s, --len)
228
0
        *s = h2o_toupper(*s);
229
0
}
Unexecuted instantiation: driver.cc:h2o_strtoupper(char*, unsigned long)
Unexecuted instantiation: driver_common.cc:h2o_strtoupper(char*, unsigned long)
Unexecuted instantiation: multithread.c:h2o_strtoupper
Unexecuted instantiation: socket.c:h2o_strtoupper
Unexecuted instantiation: socketpool.c:h2o_strtoupper
Unexecuted instantiation: string.c:h2o_strtoupper
Unexecuted instantiation: token.c:h2o_strtoupper
Unexecuted instantiation: url.c:h2o_strtoupper
Unexecuted instantiation: roundrobin.c:h2o_strtoupper
Unexecuted instantiation: config.c:h2o_strtoupper
Unexecuted instantiation: configurator.c:h2o_strtoupper
Unexecuted instantiation: context.c:h2o_strtoupper
Unexecuted instantiation: headers.c:h2o_strtoupper
Unexecuted instantiation: request.c:h2o_strtoupper
Unexecuted instantiation: util.c:h2o_strtoupper
Unexecuted instantiation: access_log.c:h2o_strtoupper
Unexecuted instantiation: file.c:h2o_strtoupper
Unexecuted instantiation: mimemap.c:h2o_strtoupper
Unexecuted instantiation: proxy.c:h2o_strtoupper
Unexecuted instantiation: http1.c:h2o_strtoupper
Unexecuted instantiation: connection.c:h2o_strtoupper
Unexecuted instantiation: frame.c:h2o_strtoupper
Unexecuted instantiation: hpack.c:h2o_strtoupper
Unexecuted instantiation: scheduler.c:h2o_strtoupper
Unexecuted instantiation: stream.c:h2o_strtoupper
Unexecuted instantiation: http2_debug_state.c:h2o_strtoupper
Unexecuted instantiation: common.c:h2o_strtoupper
Unexecuted instantiation: server.c:h2o_strtoupper
Unexecuted instantiation: cache.c:h2o_strtoupper
Unexecuted instantiation: hostinfo.c:h2o_strtoupper
Unexecuted instantiation: http3client.c:h2o_strtoupper
Unexecuted instantiation: httpclient.c:h2o_strtoupper
Unexecuted instantiation: memcached.c:h2o_strtoupper
Unexecuted instantiation: redis.c:h2o_strtoupper
Unexecuted instantiation: serverutil.c:h2o_strtoupper
Unexecuted instantiation: rand.c:h2o_strtoupper
Unexecuted instantiation: absprio.c:h2o_strtoupper
Unexecuted instantiation: logconf.c:h2o_strtoupper
Unexecuted instantiation: compress.c:h2o_strtoupper
Unexecuted instantiation: gzip.c:h2o_strtoupper
Unexecuted instantiation: headers_util.c:h2o_strtoupper
Unexecuted instantiation: cache_digests.c:h2o_strtoupper
Unexecuted instantiation: casper.c:h2o_strtoupper
Unexecuted instantiation: qpack.c:h2o_strtoupper
Unexecuted instantiation: http1client.c:h2o_strtoupper
Unexecuted instantiation: http2client.c:h2o_strtoupper
Unexecuted instantiation: pipe_sender.c:h2o_strtoupper
Unexecuted instantiation: driver_url.cc:h2o_strtoupper(char*, unsigned long)
Unexecuted instantiation: driver_h3.cc:h2o_strtoupper(char*, unsigned long)
Unexecuted instantiation: least_conn.c:h2o_strtoupper
Unexecuted instantiation: errordoc.c:h2o_strtoupper
Unexecuted instantiation: expires.c:h2o_strtoupper
Unexecuted instantiation: fastcgi.c:h2o_strtoupper
Unexecuted instantiation: h2olog.c:h2o_strtoupper
Unexecuted instantiation: connect.c:h2o_strtoupper
Unexecuted instantiation: redirect.c:h2o_strtoupper
Unexecuted instantiation: reproxy.c:h2o_strtoupper
Unexecuted instantiation: throttle_resp.c:h2o_strtoupper
Unexecuted instantiation: self_trace.c:h2o_strtoupper
Unexecuted instantiation: server_timing.c:h2o_strtoupper
Unexecuted instantiation: status.c:h2o_strtoupper
Unexecuted instantiation: events.c:h2o_strtoupper
Unexecuted instantiation: memory.c:h2o_strtoupper
Unexecuted instantiation: requests.c:h2o_strtoupper
Unexecuted instantiation: ssl.c:h2o_strtoupper
Unexecuted instantiation: durations.c:h2o_strtoupper
230
231
inline int h2o_lcstris(const char *target, size_t target_len, const char *test, size_t test_len)
232
65.1k
{
233
65.1k
    if (target_len != test_len)
234
54.7k
        return 0;
235
10.4k
    return h2o__lcstris_core(target, test, test_len);
236
65.1k
}
Unexecuted instantiation: driver.cc:h2o_lcstris(char const*, unsigned long, char const*, unsigned long)
Unexecuted instantiation: driver_common.cc:h2o_lcstris(char const*, unsigned long, char const*, unsigned long)
Unexecuted instantiation: multithread.c:h2o_lcstris
Unexecuted instantiation: socket.c:h2o_lcstris
Unexecuted instantiation: socketpool.c:h2o_lcstris
string.c:h2o_lcstris
Line
Count
Source
232
8.63k
{
233
8.63k
    if (target_len != test_len)
234
6.39k
        return 0;
235
2.23k
    return h2o__lcstris_core(target, test, test_len);
236
8.63k
}
Unexecuted instantiation: token.c:h2o_lcstris
Unexecuted instantiation: url.c:h2o_lcstris
Unexecuted instantiation: roundrobin.c:h2o_lcstris
Unexecuted instantiation: config.c:h2o_lcstris
Unexecuted instantiation: configurator.c:h2o_lcstris
Unexecuted instantiation: context.c:h2o_lcstris
Unexecuted instantiation: headers.c:h2o_lcstris
Unexecuted instantiation: request.c:h2o_lcstris
Unexecuted instantiation: util.c:h2o_lcstris
Unexecuted instantiation: access_log.c:h2o_lcstris
Unexecuted instantiation: file.c:h2o_lcstris
Unexecuted instantiation: mimemap.c:h2o_lcstris
proxy.c:h2o_lcstris
Line
Count
Source
232
20.4k
{
233
20.4k
    if (target_len != test_len)
234
19.5k
        return 0;
235
858
    return h2o__lcstris_core(target, test, test_len);
236
20.4k
}
http1.c:h2o_lcstris
Line
Count
Source
232
1.58k
{
233
1.58k
    if (target_len != test_len)
234
293
        return 0;
235
1.29k
    return h2o__lcstris_core(target, test, test_len);
236
1.58k
}
connection.c:h2o_lcstris
Line
Count
Source
232
399
{
233
399
    if (target_len != test_len)
234
262
        return 0;
235
137
    return h2o__lcstris_core(target, test, test_len);
236
399
}
Unexecuted instantiation: frame.c:h2o_lcstris
hpack.c:h2o_lcstris
Line
Count
Source
232
1.06k
{
233
1.06k
    if (target_len != test_len)
234
16
        return 0;
235
1.04k
    return h2o__lcstris_core(target, test, test_len);
236
1.06k
}
Unexecuted instantiation: scheduler.c:h2o_lcstris
Unexecuted instantiation: stream.c:h2o_lcstris
Unexecuted instantiation: http2_debug_state.c:h2o_lcstris
Unexecuted instantiation: common.c:h2o_lcstris
server.c:h2o_lcstris
Line
Count
Source
232
11
{
233
11
    if (target_len != test_len)
234
8
        return 0;
235
3
    return h2o__lcstris_core(target, test, test_len);
236
11
}
Unexecuted instantiation: cache.c:h2o_lcstris
Unexecuted instantiation: hostinfo.c:h2o_lcstris
Unexecuted instantiation: http3client.c:h2o_lcstris
Unexecuted instantiation: httpclient.c:h2o_lcstris
Unexecuted instantiation: memcached.c:h2o_lcstris
Unexecuted instantiation: redis.c:h2o_lcstris
Unexecuted instantiation: serverutil.c:h2o_lcstris
Unexecuted instantiation: rand.c:h2o_lcstris
Unexecuted instantiation: absprio.c:h2o_lcstris
Unexecuted instantiation: logconf.c:h2o_lcstris
Unexecuted instantiation: compress.c:h2o_lcstris
Unexecuted instantiation: gzip.c:h2o_lcstris
Unexecuted instantiation: headers_util.c:h2o_lcstris
cache_digests.c:h2o_lcstris
Line
Count
Source
232
33.0k
{
233
33.0k
    if (target_len != test_len)
234
28.1k
        return 0;
235
4.89k
    return h2o__lcstris_core(target, test, test_len);
236
33.0k
}
Unexecuted instantiation: casper.c:h2o_lcstris
Unexecuted instantiation: qpack.c:h2o_lcstris
Unexecuted instantiation: http1client.c:h2o_lcstris
Unexecuted instantiation: http2client.c:h2o_lcstris
Unexecuted instantiation: pipe_sender.c:h2o_lcstris
Unexecuted instantiation: driver_url.cc:h2o_lcstris(char const*, unsigned long, char const*, unsigned long)
Unexecuted instantiation: driver_h3.cc:h2o_lcstris(char const*, unsigned long, char const*, unsigned long)
Unexecuted instantiation: least_conn.c:h2o_lcstris
Unexecuted instantiation: errordoc.c:h2o_lcstris
Unexecuted instantiation: expires.c:h2o_lcstris
Unexecuted instantiation: fastcgi.c:h2o_lcstris
Unexecuted instantiation: h2olog.c:h2o_lcstris
Unexecuted instantiation: connect.c:h2o_lcstris
Unexecuted instantiation: redirect.c:h2o_lcstris
Unexecuted instantiation: reproxy.c:h2o_lcstris
Unexecuted instantiation: throttle_resp.c:h2o_lcstris
Unexecuted instantiation: self_trace.c:h2o_lcstris
Unexecuted instantiation: server_timing.c:h2o_lcstris
Unexecuted instantiation: status.c:h2o_lcstris
Unexecuted instantiation: events.c:h2o_lcstris
Unexecuted instantiation: memory.c:h2o_lcstris
Unexecuted instantiation: requests.c:h2o_lcstris
Unexecuted instantiation: ssl.c:h2o_lcstris
Unexecuted instantiation: durations.c:h2o_lcstris
237
238
inline size_t h2o_base64_encode_capacity(size_t len)
239
0
{
240
0
    return (((len) + 2) / 3 * 4 + 1);
241
0
}
Unexecuted instantiation: driver.cc:h2o_base64_encode_capacity(unsigned long)
Unexecuted instantiation: driver_common.cc:h2o_base64_encode_capacity(unsigned long)
Unexecuted instantiation: multithread.c:h2o_base64_encode_capacity
Unexecuted instantiation: socket.c:h2o_base64_encode_capacity
Unexecuted instantiation: socketpool.c:h2o_base64_encode_capacity
Unexecuted instantiation: string.c:h2o_base64_encode_capacity
Unexecuted instantiation: token.c:h2o_base64_encode_capacity
Unexecuted instantiation: url.c:h2o_base64_encode_capacity
Unexecuted instantiation: roundrobin.c:h2o_base64_encode_capacity
Unexecuted instantiation: config.c:h2o_base64_encode_capacity
Unexecuted instantiation: configurator.c:h2o_base64_encode_capacity
Unexecuted instantiation: context.c:h2o_base64_encode_capacity
Unexecuted instantiation: headers.c:h2o_base64_encode_capacity
Unexecuted instantiation: request.c:h2o_base64_encode_capacity
Unexecuted instantiation: util.c:h2o_base64_encode_capacity
Unexecuted instantiation: access_log.c:h2o_base64_encode_capacity
Unexecuted instantiation: file.c:h2o_base64_encode_capacity
Unexecuted instantiation: mimemap.c:h2o_base64_encode_capacity
Unexecuted instantiation: proxy.c:h2o_base64_encode_capacity
Unexecuted instantiation: http1.c:h2o_base64_encode_capacity
Unexecuted instantiation: connection.c:h2o_base64_encode_capacity
Unexecuted instantiation: frame.c:h2o_base64_encode_capacity
Unexecuted instantiation: hpack.c:h2o_base64_encode_capacity
Unexecuted instantiation: scheduler.c:h2o_base64_encode_capacity
Unexecuted instantiation: stream.c:h2o_base64_encode_capacity
Unexecuted instantiation: http2_debug_state.c:h2o_base64_encode_capacity
Unexecuted instantiation: common.c:h2o_base64_encode_capacity
Unexecuted instantiation: server.c:h2o_base64_encode_capacity
Unexecuted instantiation: cache.c:h2o_base64_encode_capacity
Unexecuted instantiation: hostinfo.c:h2o_base64_encode_capacity
Unexecuted instantiation: http3client.c:h2o_base64_encode_capacity
Unexecuted instantiation: httpclient.c:h2o_base64_encode_capacity
Unexecuted instantiation: memcached.c:h2o_base64_encode_capacity
Unexecuted instantiation: redis.c:h2o_base64_encode_capacity
Unexecuted instantiation: serverutil.c:h2o_base64_encode_capacity
Unexecuted instantiation: rand.c:h2o_base64_encode_capacity
Unexecuted instantiation: absprio.c:h2o_base64_encode_capacity
Unexecuted instantiation: logconf.c:h2o_base64_encode_capacity
Unexecuted instantiation: compress.c:h2o_base64_encode_capacity
Unexecuted instantiation: gzip.c:h2o_base64_encode_capacity
Unexecuted instantiation: headers_util.c:h2o_base64_encode_capacity
Unexecuted instantiation: cache_digests.c:h2o_base64_encode_capacity
Unexecuted instantiation: casper.c:h2o_base64_encode_capacity
Unexecuted instantiation: qpack.c:h2o_base64_encode_capacity
Unexecuted instantiation: http1client.c:h2o_base64_encode_capacity
Unexecuted instantiation: http2client.c:h2o_base64_encode_capacity
Unexecuted instantiation: pipe_sender.c:h2o_base64_encode_capacity
Unexecuted instantiation: driver_url.cc:h2o_base64_encode_capacity(unsigned long)
Unexecuted instantiation: driver_h3.cc:h2o_base64_encode_capacity(unsigned long)
Unexecuted instantiation: least_conn.c:h2o_base64_encode_capacity
Unexecuted instantiation: errordoc.c:h2o_base64_encode_capacity
Unexecuted instantiation: expires.c:h2o_base64_encode_capacity
Unexecuted instantiation: fastcgi.c:h2o_base64_encode_capacity
Unexecuted instantiation: h2olog.c:h2o_base64_encode_capacity
Unexecuted instantiation: connect.c:h2o_base64_encode_capacity
Unexecuted instantiation: redirect.c:h2o_base64_encode_capacity
Unexecuted instantiation: reproxy.c:h2o_base64_encode_capacity
Unexecuted instantiation: throttle_resp.c:h2o_base64_encode_capacity
Unexecuted instantiation: self_trace.c:h2o_base64_encode_capacity
Unexecuted instantiation: server_timing.c:h2o_base64_encode_capacity
Unexecuted instantiation: status.c:h2o_base64_encode_capacity
Unexecuted instantiation: events.c:h2o_base64_encode_capacity
Unexecuted instantiation: memory.c:h2o_base64_encode_capacity
Unexecuted instantiation: requests.c:h2o_base64_encode_capacity
Unexecuted instantiation: ssl.c:h2o_base64_encode_capacity
Unexecuted instantiation: durations.c:h2o_base64_encode_capacity
242
243
#ifdef __cplusplus
244
}
245
#endif
246
247
#endif