size_t HTTP2Codec::generateTrailers(folly::IOBufQueue& writeBuf,
                                    StreamID stream,
                                    const HTTPHeaders& trailers) {
  VLOG(4) << "generating TRAILERS for stream=" << stream;
  std::vector<compress::Header> allHeaders;
  CodecUtil::appendHeaders(trailers, allHeaders, HTTP_HEADER_NONE);

  HTTPHeaderSize size;
  auto out = encodeHeaders(trailers, allHeaders, &size);

  IOBufQueue queue(IOBufQueue::cacheChainLength());
  queue.append(std::move(out));
  auto maxFrameSize = maxSendFrameSize();
  if (queue.chainLength() > 0) {
    folly::Optional<http2::PriorityUpdate> pri;
    auto remainingFrameSize = maxFrameSize;
    auto chunk = queue.split(std::min(remainingFrameSize, queue.chainLength()));
    bool endHeaders = queue.chainLength() == 0;
    generateHeaderCallbackWrapper(stream,
                                  http2::FrameType::HEADERS,
                                  http2::writeHeaders(writeBuf,
                                                      std::move(chunk),
                                                      stream,
                                                      pri,
                                                      http2::kNoPadding,
                                                      true /*eom*/,
                                                      endHeaders));

    if (!endHeaders) {
      generateContinuation(writeBuf, queue, stream, maxFrameSize);
    }
  }

  return size.compressed;
}
The product receives input or data, but it does
        not validate or incorrectly validates that the input has the
        properties that are required to process the data safely and
        correctly.