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!");
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