Browse Source

for whatever reason we cannot write a 'response' to the socket, but need a 'response_serializer' on boost 1.67 (Debian 10) m(

pull/1/head
roker 12 months ago
parent
commit
68f849d814
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      webserver.cc

+ 3
- 1
webserver.cc View File

@ -145,7 +145,9 @@ void Webserver::deliver_file(tcp::socket *socket, const request& req)
res.set(http::field::content_type, mime_type(p.string().c_str()));
res.content_length(size);
res.keep_alive(req.keep_alive());
http::write(*socket, res, ec);
http::response_serializer<http::file_body> res_ser{res};
http::write(*socket, res_ser, ec);
}
}
else {


Loading…
Cancel
Save