Skip to content

Commit 7f527ef

Browse files
committed
Fix bug for new release of http
1 parent 147e3b0 commit 7f527ef

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
out/
44
build/
55
train/*.bin
6-
node_modules/
6+
node_modules/

src/httpserver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ class http_connection : public std::enable_shared_from_this<http_connection>
172172
{
173173
auto self = shared_from_this();
174174

175-
response_.set(http::field::content_length, response_.body().size());
175+
response_.set(http::field::content_length, std::to_string(response_.body().size()));
176176

177177
http::async_write(socket_, response_, [self](beast::error_code ec, std::size_t) {
178178
self->socket_.shutdown(tcp::socket::shutdown_send, ec);

0 commit comments

Comments
 (0)