| 525 | |
| 526 | template <class T> |
| 527 | void |
| 528 | captureFromHeaders(const ConfigHeaders &config, const String &name, const String &value, T &captures) |
| 529 | { |
| 530 | CacheKeyDebug("processing capture from header %s", name.c_str()); |
| 531 | auto itMp = config.getCaptures().find(name); |
| 532 | if (config.getCaptures().end() != itMp) { |
| 533 | itMp->second->process(value, captures); |
| 534 | CacheKeyDebug("found capture pattern for header '%s'", name.c_str()); |
| 535 | } else { |
| 536 | CacheKeyDebug("failed to find header '%s'", name.c_str()); |
| 537 | } |
| 538 | } |
| 539 | |
| 540 | /** |
| 541 | * @brief Append headers by following the rules specified in the header configuration object. |