| 315 | } |
| 316 | |
| 317 | cripts::string_view |
| 318 | Header::iterate() |
| 319 | { |
| 320 | _ensure_initialized(this); |
| 321 | TSMLoc next_loc = TSMimeHdrFieldNext(_bufp, _hdr_loc, _iterator_loc); |
| 322 | |
| 323 | TSHandleMLocRelease(_bufp, _hdr_loc, _iterator_loc); |
| 324 | _iterator_loc = next_loc; |
| 325 | |
| 326 | if (_iterator_loc) { |
| 327 | int name_len; |
| 328 | const char *name = TSMimeHdrFieldNameGet(_bufp, _hdr_loc, _iterator_loc, &name_len); |
| 329 | |
| 330 | return {name, static_cast<cripts::string_view::size_type>(name_len)}; |
| 331 | } else { |
| 332 | return ""; |
| 333 | } |
| 334 | } |
| 335 | |
| 336 | Client::Response & |
| 337 | Client::Response::_get(cripts::Context *context) |
no test coverage detected