diff --git a/src/plugins/http/src/httpRestHandle.c b/src/plugins/http/src/httpRestHandle.c index aee6d1a5d0..a285670d20 100644 --- a/src/plugins/http/src/httpRestHandle.c +++ b/src/plugins/http/src/httpRestHandle.c @@ -158,7 +158,7 @@ static bool restProcessUdfRequest(HttpContext* pContext) { } char* sql = pContext->parser->body.str; - int len = pContext->parser->body.size; + int len = pContext->parser->body.pos; if (sql == NULL) { httpSendErrorResp(pContext, TSDB_CODE_HTTP_NO_SQL_INPUT); return false;