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

Function hdrtoken_tokenize_dfa

src/proxy/hdrs/HdrToken.cc:465–485  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

463 -------------------------------------------------------------------------*/
464
465int
466hdrtoken_tokenize_dfa(const char *string, int string_len, const char **wks_string_out)
467{
468 int wks_idx;
469
470 wks_idx = hdrtoken_strs_dfa->match({string, size_t(string_len)});
471
472 if (wks_idx < 0) {
473 wks_idx = -1;
474 }
475 if (wks_string_out) {
476 if (wks_idx >= 0) {
477 *wks_string_out = hdrtoken_index_to_wks(wks_idx);
478 } else {
479 *wks_string_out = nullptr;
480 }
481 }
482 // printf("hdrtoken_tokenize_dfa(%d,*s) - return %d\n",string_len,string,wks_idx);
483
484 return wks_idx;
485}
486
487/*-------------------------------------------------------------------------
488 Have to work around that methods are case insensitive while the DFA is

Callers 2

hdrtoken_hash_initFunction · 0.85
hdrtoken_initFunction · 0.85

Calls 2

hdrtoken_index_to_wksFunction · 0.85
matchMethod · 0.45

Tested by

no test coverage detected