From b619220f805cf565050324e9725f771ffbf9b40c Mon Sep 17 00:00:00 2001 From: Igor Gaponenko Date: Tue, 11 Jun 2024 14:55:05 -0700 Subject: [PATCH] Fixed a bug in the unit test The pre-commit version of the code was using std::istream_iterator which truncated line termination sequences. The new code uses std::istreambuf_iterator. --- src/qhttp/testqhttp.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qhttp/testqhttp.cc b/src/qhttp/testqhttp.cc index 273c29abf..f39e2976e 100644 --- a/src/qhttp/testqhttp.cc +++ b/src/qhttp/testqhttp.cc @@ -951,7 +951,7 @@ BOOST_FIXTURE_TEST_CASE(body_stream_reader, QhttpFixture) { response->sendStatus(qhttp::STATUS_INTERNAL_SERVER_ERR); return; } - _readContent.append(std::istream_iterator(request->content), std::istream_iterator()); + _readContent.append(std::istreambuf_iterator(request->content), {}); ++_numReads; if (request->contentReadBytes() == request->contentLengthBytes()) { BOOST_CHECK_EQUAL(_expectedNumReads, _numReads);