void append_last_header_key(BlockAllocator &balloc, bool &key_prev, size_t &sum,
                            HeaderRefs &headers, const char *data, size_t len) {
  assert(key_prev);
  sum += len;
  auto &item = headers.back();
  auto name =
      realloc_concat_string_ref(balloc, item.name, StringRef{data, len});

  auto p = const_cast<uint8_t *>(name.byte());
  util::inp_strlower(p + name.size() - len, p + name.size());

  item.name = name;
  item.token = http2::lookup_token(item.name);
}
void append_last_header_key(BlockAllocator &balloc, bool &key_prev, size_t &sum,
                            HeaderRefs &headers, const char *data, size_t len) {
  assert(key_prev);
  sum += len;
  auto &item = headers.back();
  auto name =
      realloc_concat_string_ref(balloc, item.name, StringRef{data, len});

  auto p = const_cast<uint8_t *>(name.byte());
  util::inp_strlower(p + name.size() - len, p + name.size());

  item.name = name;
  item.token = http2::lookup_token(item.name);
}