Skip to content

Commit

Permalink
made persistent_connection::read_data_if data arg immutable
Browse files Browse the repository at this point in the history
  • Loading branch information
mrbald committed Apr 30, 2024
1 parent 9ecf6a2 commit d6f6ba8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CRUD/service/persistent_connection.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,11 @@ class persistent_connection
});
}

boost::system::error_code read_data_if(char *data, std::size_t bytes_transferred) {
boost::system::error_code read_data_if(char * const data, std::size_t bytes_transferred) {
static constexpr auto is_content_length = [](const header &h) noexcept { return h.name == "content-length" ; };

boost::system::error_code ec{};
if (data) {
if (data != nullptr) {
auto itr = find_if(begin(request_.headers), end(request_.headers), is_content_length);

if (itr != end(request_.headers)) {
Expand Down

0 comments on commit d6f6ba8

Please sign in to comment.