void McProtocolSerializer::RequestContext::serializeMcMsgAscii(
    const McMsgRef& req) {
  // We need to ensure that this message lives as long as we have iovs.
  msg_ = req.clone();

  size_t hdrLength = mc_ascii_req_max_hdr_length(msg_.get());

  asciiBuffer_ = std::unique_ptr<char[]>(new char[hdrLength]);

  int r = mc_serialize_req_ascii(msg_.get(), asciiBuffer_.get(), hdrLength,
    iovs_, kMaxIovs);

  iovsCount_ = r < 0 ? 0 : r;
}