fix lost last chunk when there is two chunks in one read
This commit is contained in:
parent
6e0a1ec9e8
commit
345eb11c72
1 changed files with 7 additions and 3 deletions
|
|
@ -592,9 +592,13 @@ namespace SimpleWeb {
|
||||||
chunked_stream.get();
|
chunked_stream.get();
|
||||||
chunked_stream.get();
|
chunked_stream.get();
|
||||||
|
|
||||||
if(length > 0)
|
if (length > 0) {
|
||||||
this->read_chunked(session, tmp_streambuf);
|
if (chunked_streambuf->size() > 0) {
|
||||||
else {
|
std::ostream response_stream(&session->response->streambuf);
|
||||||
|
response_stream << chunked_streambuf.get();
|
||||||
|
}
|
||||||
|
this->read_chunked(session, tmp_streambuf);
|
||||||
|
}else {
|
||||||
if(tmp_streambuf->size() > 0) {
|
if(tmp_streambuf->size() > 0) {
|
||||||
std::ostream response_stream(&session->response->streambuf);
|
std::ostream response_stream(&session->response->streambuf);
|
||||||
response_stream << tmp_streambuf.get();
|
response_stream << tmp_streambuf.get();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue