X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/6bffb655ac989fe4f115763270f84175bf24e4bb..3a8788fb198a1e0590823745f39fbff81056db09:/Server/src/server.cpp diff --git a/Server/src/server.cpp b/Server/src/server.cpp index 375087a..37f5c1c 100644 --- a/Server/src/server.cpp +++ b/Server/src/server.cpp @@ -186,7 +186,11 @@ void Server::on_control_command_received(const Command& command, response.set_body("Invalid command for 'connection' taget!"); } } else if (command.get_target() == "transmission") { + response.status_code = HTTPMessage::NOT_FOUND; + response.set_body("Invalid command for 'transmission' taget!"); } else if (command.get_target() == "plant") { + response.status_code = HTTPMessage::NOT_FOUND; + response.set_body("Invalid command for 'plant' taget!"); } else { response.status_code = HTTPMessage::NOT_FOUND; response.set_body("Invalid Target!"); @@ -195,7 +199,9 @@ void Server::on_control_command_received(const Command& command, response.headers["Content-Type"] = "text/html; charset=iso-8859-1"; response.headers["Connection"] = "close"; server->send(response); - server->finish(); + // FIXME con timeout no debería ser necesario. Verificar cabecera Connection + // para saber si hay que finish()earlo o no. + // server->finish(); } } // namespace Server