Skip to content

Commit

Permalink
fix (#512)
Browse files Browse the repository at this point in the history
  • Loading branch information
qicosmos authored Jan 30, 2024
1 parent e32fdf3 commit ccb7cca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions include/cinatra/coro_http_client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -811,6 +811,11 @@ class coro_http_client : public std::enable_shared_from_this<coro_http_client> {
req_str_.clear();
total_len_ = 0;
#endif

// clear
head_buf_.consume(head_buf_.size());
chunked_buf_.consume(chunked_buf_.size());
resp_chunk_str_.clear();
}

async_simple::coro::Lazy<resp_data> reconnect(std::string uri) {
Expand Down
2 changes: 1 addition & 1 deletion include/cinatra/string_resize.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace cinatra::detail {
#if __cpp_lib_string_resize_and_overwrite >= 202110L
template <typename ch>
inline void resize(std::basic_string<ch> &str, std::size_t sz) {
str.resize_and_overwrite(sz, [](ch *, std::size_t sz) {
str.resize_and_overwrite(sz, [sz](ch *, std::size_t) {
return sz;
});
}
Expand Down

0 comments on commit ccb7cca

Please sign in to comment.