From 802caaf29651c01bd8438aec4f2485db2301354f Mon Sep 17 00:00:00 2001 From: zhaoliwei Date: Tue, 8 Oct 2019 10:41:12 +0800 Subject: [PATCH] http get app envs --- src/dist/replication/meta_server/meta_http_service.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dist/replication/meta_server/meta_http_service.cpp b/src/dist/replication/meta_server/meta_http_service.cpp index dc6881e08c..8022aa0170 100644 --- a/src/dist/replication/meta_server/meta_http_service.cpp +++ b/src/dist/replication/meta_server/meta_http_service.cpp @@ -475,7 +475,7 @@ void meta_http_service::get_app_envs_handler(const http_request &req, http_respo std::string app_name; for (const auto &p : req.query_args) { - if (0 == p.first.compare("name")) { + if ("name" == p.first) { app_name = p.second; break; } @@ -484,6 +484,7 @@ void meta_http_service::get_app_envs_handler(const http_request &req, http_respo // app name must be set if (app_name.empty()) { resp.status_code = http_status_code::bad_request; + resp.body = "app name cann't be empty"; return; }