]> git.llucax.com Git - z.facultad/75.42/plaqui.git/blobdiff - Server/src/server.cpp
agrego las compuertas pero todavia no hacen nada, ademas tengo un conflicto con el...
[z.facultad/75.42/plaqui.git] / Server / src / server.cpp
index 375087a169f7de12dfa894ba62e5d3cdf3ee460c..37f5c1c75b7d26d7ca1e6d763d6a21a2ee02f36b 100644 (file)
@@ -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