| 1614 | } |
| 1615 | |
| 1616 | void H2UnsentRequest::Print(std::ostream& os) const { |
| 1617 | os << "[ H2 REQUEST @" << butil::my_ip() << " ]\n"; |
| 1618 | for (size_t i = 0; i < _size; ++i) { |
| 1619 | os << "> " << _list[i].name << " = " << _list[i].value << '\n'; |
| 1620 | } |
| 1621 | std::unique_lock<butil::Mutex> mu(_mutex); |
| 1622 | if (_cntl == NULL) { |
| 1623 | return; |
| 1624 | } |
| 1625 | if (_cntl->has_http_request()) { |
| 1626 | const HttpHeader& h = _cntl->http_request(); |
| 1627 | for (HttpHeader::HeaderIterator it = h.HeaderBegin(); |
| 1628 | it != h.HeaderEnd(); ++it) { |
| 1629 | os << "> " << it->first << " = " << it->second << '\n'; |
| 1630 | } |
| 1631 | } |
| 1632 | const butil::IOBuf* body = &_cntl->request_attachment(); |
| 1633 | if (!body->empty()) { |
| 1634 | os << "> \n"; |
| 1635 | } |
| 1636 | os << butil::ToPrintable(*body, FLAGS_http_verbose_max_body_length); |
| 1637 | |
| 1638 | } |
| 1639 | |
| 1640 | H2UnsentResponse::H2UnsentResponse(Controller* c, int stream_id, bool is_grpc) |
| 1641 | : _size(0) |
no test coverage detected