| 247 | //-------------------------------------------------------------------------- |
| 248 | |
| 249 | void |
| 250 | doIncrementalRead() |
| 251 | { |
| 252 | test::stream ts{ioc_}; |
| 253 | std::string s(2048, '*'); |
| 254 | ostream(ts.buffer()) << |
| 255 | "HTTP/1.1 200 OK\r\n" |
| 256 | "Content-Length: 2048\r\n" |
| 257 | "Server: test\r\n" |
| 258 | "\r\n" << |
| 259 | s; |
| 260 | error_code ec; |
| 261 | flat_buffer b; |
| 262 | std::stringstream ss; |
| 263 | read_and_print_body<false>(ss, ts, b, ec); |
| 264 | if(BEAST_EXPECTS(! ec, ec.message())) |
| 265 | BEAST_EXPECT(ss.str() == s); |
| 266 | } |
| 267 | |
| 268 | //-------------------------------------------------------------------------- |
| 269 | |