diff options
author | pierobot <Xv24xt@airmail.cc> | 2016-03-07 17:21:19 -0600 |
---|---|---|
committer | pierobot <Xv24xt@airmail.cc> | 2016-03-07 17:21:19 -0600 |
commit | f57d257dc6d684ca5317647e86833c75ae1e1e50 (patch) | |
tree | 005b9928c0b0da4434a250ca87022087ae36bef9 /include | |
parent | 206ecc77601725f3b3a34f28c58b00b835177148 (diff) | |
download | crow-f57d257dc6d684ca5317647e86833c75ae1e1e50.tar.gz crow-f57d257dc6d684ca5317647e86833c75ae1e1e50.zip |
Fix buffer corruption bug
https://github.com/ipkn/crow/issues/122
Diffstat (limited to 'include')
-rw-r--r-- | include/http_connection.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/http_connection.h b/include/http_connection.h index 3d516a9..4d9f035 100644 --- a/include/http_connection.h +++ b/include/http_connection.h @@ -430,7 +430,6 @@ namespace crow buffers_.emplace_back(res_body_copy_.data(), res_body_copy_.size()); do_write(); - res.clear(); if (need_to_start_read_after_complete_) { @@ -488,6 +487,7 @@ namespace crow [&](const boost::system::error_code& ec, std::size_t bytes_transferred) { is_writing = false; + res.clear(); res_body_copy_.clear(); if (!ec) { |