mirror of
https://github.com/badaix/snapcast.git
synced 2025-04-30 02:37:15 +02:00
Fix handling of post requests
This commit is contained in:
parent
0807641984
commit
017ab24c0b
1 changed files with 10 additions and 9 deletions
|
@ -220,7 +220,8 @@ void ControlSessionHttp::handle_request(http::request<Body, http::basic_fields<A
|
|||
if (req.target() != "/jsonrpc")
|
||||
return send(bad_request("Illegal request-target"));
|
||||
|
||||
message_receiver_->onMessageReceived(shared_from_this(), req.body(), [req = std::move(req), send = std::move(send)](const std::string& response) {
|
||||
return message_receiver_->onMessageReceived(shared_from_this(), std::string(req.body()),
|
||||
[req = std::move(req), send = std::move(send)](const std::string& response) {
|
||||
http::response<http::string_body> res{http::status::ok, req.version()};
|
||||
res.set(http::field::server, HTTP_SERVER_NAME);
|
||||
res.set(http::field::content_type, "application/json");
|
||||
|
|
Loading…
Add table
Reference in a new issue