MCPcopy Create free account
hub / github.com/apache/trafficserver / check_for_field_value

Method check_for_field_value

src/proxy/FetchSM.cc:202–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200}
201
202bool
203FetchSM::check_for_field_value(const char *name, size_t name_len, char const *value, size_t value_len)
204{
205 bool zret = false; // not found.
206 StrList slist;
207 HTTPHdr *hdr = &client_response_hdr;
208 int ret = hdr->value_get_comma_list(name, name_len, &slist);
209
210 ink_release_assert(header_done);
211
212 if (ret) {
213 for (Str *f = slist.head; f != nullptr; f = f->next) {
214 if (f->len == value_len && 0 == strncasecmp(f->str, value, value_len)) {
215 Dbg(dbg_ctl, "[%s] field '%.*s', value '%.*s'", __FUNCTION__, static_cast<int>(name_len), name, static_cast<int>(value_len),
216 value);
217 zret = true;
218 break;
219 }
220 }
221 }
222 return zret;
223}
224
225bool
226FetchSM::check_chunked()

Callers 2

check_chunkedMethod · 0.95

Calls 1

value_get_comma_listMethod · 0.80

Tested by

no test coverage detected