Skip to content

Commit

Permalink
clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
helintongh committed Nov 27, 2023
1 parent 2030c9c commit 2277aaf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion include/cinatra/connection.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ class connection : public base_connection,
});
}

void write_chunked_data_v2(std::string_view buf,bool eof) {
void write_chunked_data_v2(std::string_view buf, bool eof) {
std::vector<asio::const_buffer> buffers =
to_chunked_buffers<asio::const_buffer>(buf.data(), buf.length(),
chunk_size_str_, eof);
Expand Down
7 changes: 2 additions & 5 deletions include/cinatra/http_server.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -555,10 +555,9 @@ class http_server_ : private noncopyable {

req.get_conn<ScoketType>()->write_chunked_header(
std::string_view(res_content_header), req.is_range());

}

void write_chunked_body(request &req) {
void write_chunked_body(request &req) {
const size_t len = 3 * 1024 * 1024;
auto str = get_send_data(req, len);
auto read_len = str.size();
Expand All @@ -567,9 +566,7 @@ class http_server_ : private noncopyable {
}

void write_chunked_body(request &req, std::string_view file_cache) {

req.get_conn<ScoketType>()->write_chunked_data_v2(file_cache,
true);
req.get_conn<ScoketType>()->write_chunked_data_v2(file_cache, true);
}

void write_ranges_header(request &req, std::string_view mime,
Expand Down

0 comments on commit 2277aaf

Please sign in to comment.