diff --git a/src/plugins/http/inc/httpMetricsHandle.h b/src/plugins/http/inc/httpMetricsHandle.h index 77211e7a7b439144806cabc50c4f6943a5e1b49d..e05a8ce6874452e616bf14245db515ef7e8c182c 100644 --- a/src/plugins/http/inc/httpMetricsHandle.h +++ b/src/plugins/http/inc/httpMetricsHandle.h @@ -1,7 +1,17 @@ -// -// Created by slzhou on 8/6/21. -// - +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ #ifndef TDENGINE_HTTPMETRICSHANDLE_H #define TDENGINE_HTTPMETRICSHANDLE_H diff --git a/src/plugins/http/src/httpMetricsHandle.c b/src/plugins/http/src/httpMetricsHandle.c index 9a9e564823d5ae37bfa360c8c4b49f2541cf9c83..dbabd48774aa077b1b4f842b4bc47dfd5de67ce4 100644 --- a/src/plugins/http/src/httpMetricsHandle.c +++ b/src/plugins/http/src/httpMetricsHandle.c @@ -1,6 +1,17 @@ -// -// Created by slzhou on 8/6/21. -// +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ #define _DEFAULT_SOURCE #include "os.h" #include "taoserror.h" @@ -39,8 +50,8 @@ bool metricsProcessRequest(HttpContext* pContext) { httpJsonToken(jsonBuf, JsonObjStt); char* keyTagName = "name"; char* keyTagValue = "value"; - httpJsonPairOriginString(jsonBuf, keyTagName, (int32_t)strlen(keyTagName), "dnode_id", - (int32_t)strlen("dnode_id")); + httpJsonPairOriginString(jsonBuf, keyTagName, (int32_t)strlen(keyTagName), "\"dnode_id\"", + (int32_t)strlen("\"dnode_id\"")); int32_t dnodeId = dnodeGetDnodeId(); httpJsonPairIntVal(jsonBuf, keyTagValue, (int32_t)strlen(keyTagValue), dnodeId); httpJsonToken(jsonBuf, JsonObjEnd);