| 274 | |
| 275 | template<bool isRequest> |
| 276 | bool |
| 277 | equal_body(string_view sv, string_view body) |
| 278 | { |
| 279 | test::stream ts{ioc_, sv}, tr{ioc_}; |
| 280 | ts.connect(tr); |
| 281 | message<isRequest, string_body, fields> m; |
| 282 | multi_buffer b; |
| 283 | ts.close_remote(); |
| 284 | try |
| 285 | { |
| 286 | read(ts, b, m); |
| 287 | return m.body() == body; |
| 288 | } |
| 289 | catch(std::exception const& e) |
| 290 | { |
| 291 | log << "equal_body: " << e.what() << std::endl; |
| 292 | return false; |
| 293 | } |
| 294 | } |
| 295 | |
| 296 | template<bool isRequest, class Body, class Fields> |
| 297 | std::string |