| 146 | } |
| 147 | |
| 148 | inline void response::append_body(const char* p, size_t sz) |
| 149 | { |
| 150 | // simple and generates significantly less code than std::stringstream |
| 151 | constexpr size_t min_capacity = 512; |
| 152 | if (m_body.capacity() < min_capacity) { |
| 153 | m_body.reserve(min_capacity); |
| 154 | } |
| 155 | |
| 156 | m_body.append(p, sz); |
| 157 | } |
| 158 | |
| 159 | inline bool response::has_header(char const* header) const |
| 160 | { |