forked from boostorg/beast
Return http::error::end_of_stream on HTTP read eof (API Change)
fix #350
This commit is contained in:
1 parent
463d891e5c
commit
0656c5b1f5
5 files changed
+62
-4
No files matched your search
@@ -185,8 +185,11 @@ operator()(error_code ec,
|
||||
BOOST_ASSERT(bytes_transferred == 0);
|
||||
d.bytes_used = 0;
|
||||
if(! d.p.got_some())
|
||||
{
|
||||
ec = error::end_of_stream;
|
||||
goto upcall;
|
||||
// caller sees EOF on next read.
|
||||
}
|
||||
// caller sees end_of_stream on next read.
|
||||
ec = {};
|
||||
d.p.write_eof(ec);
|
||||
if(ec)
|
||||
@@ -194,7 +197,7 @@ operator()(error_code ec,
|
||||
BOOST_ASSERT(d.p.is_complete());
|
||||
goto upcall;
|
||||
}
|
||||
else if(ec)
|
||||
if(ec)
|
||||
{
|
||||
d.bytes_used = 0;
|
||||
goto upcall;
|
||||
|
||||
@@ -76,7 +76,9 @@ read_some_buffer(
|
||||
if(ec)
|
||||
return 0;
|
||||
BOOST_ASSERT(parser.is_complete());
|
||||
break;
|
||||
}
|
||||
ec = error::end_of_stream;
|
||||
break;
|
||||
}
|
||||
else if(ec)
|
||||
|
||||
Reference in new issue
Block a user