| 240 | } |
| 241 | |
| 242 | static int |
| 243 | http_insert_forwarded_cb(const char *name, RecDataT dtype, RecData data, void *cookie) |
| 244 | { |
| 245 | bool valid_p = false; |
| 246 | HttpConfigParams *c = static_cast<HttpConfigParams *>(cookie); |
| 247 | |
| 248 | if (0 == strcasecmp("proxy.config.http.insert_forwarded", name)) { |
| 249 | if (RECD_STRING == dtype) { |
| 250 | swoc::LocalBufferWriter<1024> error; |
| 251 | HttpForwarded::OptionBitSet bs = HttpForwarded::optStrToBitset(std::string_view(data.rec_string), error); |
| 252 | if (!error.size()) { |
| 253 | c->oride.insert_forwarded = bs; |
| 254 | valid_p = true; |
| 255 | } else { |
| 256 | Error("HTTP %.*s", static_cast<int>(error.size()), error.data()); |
| 257 | } |
| 258 | } |
| 259 | } |
| 260 | |
| 261 | // Signal an update if valid value arrived. |
| 262 | if (valid_p) { |
| 263 | http_config_cb(name, dtype, data, cookie); |
| 264 | } |
| 265 | |
| 266 | return REC_ERR_OKAY; |
| 267 | } |
| 268 | |
| 269 | void |
| 270 | register_stat_callbacks() |
nothing calls this directly
no test coverage detected