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

Method begin

src/cripts/Headers.cc:291–315  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

289}
290
291Header::Iterator
292Header::begin()
293{
294 _ensure_initialized(this);
295 // Cleanup any lingering iterator state
296 if (_iterator_loc) {
297 TSHandleMLocRelease(_bufp, _hdr_loc, _iterator_loc);
298 _iterator_loc = nullptr;
299 }
300
301 // Start the new iterator
302 ++_iterator_tag;
303 _iterator_loc = TSMimeHdrFieldGet(_bufp, _hdr_loc, 0);
304
305 if (_iterator_loc) {
306 int name_len;
307 const char *name = TSMimeHdrFieldNameGet(_bufp, _hdr_loc, _iterator_loc, &name_len);
308 cripts::string_view name_view(name, name_len);
309
310 return {name_view, _iterator_tag, this};
311
312 } else {
313 return Iterator::end(); // Seems unlikely that we'd not have any headers...
314 }
315}
316
317cripts::string_view
318Header::iterate()

Callers 15

loaderMethod · 0.45
decodeMethod · 0.45
is_port_in_the_rangesFunction · 0.45
clearCTXMethod · 0.45
_store_ssl_ctxMethod · 0.45
update_ssl_ctxMethod · 0.45
register_cert_secretsMethod · 0.45
stapling_get_cert_infoFunction · 0.45
clearMethod · 0.45
StartDNSMethod · 0.45

Calls 3

TSHandleMLocReleaseFunction · 0.85
TSMimeHdrFieldGetFunction · 0.85
TSMimeHdrFieldNameGetFunction · 0.85

Tested by 4

chunkMethod · 0.36
random_stringFunction · 0.36
subtractFunction · 0.36
CB_Update_SecretFunction · 0.36