You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by do...@apache.org on 2023/04/04 07:02:15 UTC

[inlong] branch master updated: [INLONG-7781][SDK] Solve the problem of cpp-sdk send data by HTTP protocol (#7782)

This is an automated email from the ASF dual-hosted git repository.

dockerzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/inlong.git


The following commit(s) were added to refs/heads/master by this push:
     new ff6a3458d [INLONG-7781][SDK] Solve the problem of cpp-sdk send data by HTTP protocol (#7782)
ff6a3458d is described below

commit ff6a3458d147a46779fc2628cef2bc7e8531bd5a
Author: doleyzi <43...@users.noreply.github.com>
AuthorDate: Tue Apr 4 15:02:08 2023 +0800

    [INLONG-7781][SDK] Solve the problem of cpp-sdk send data by HTTP protocol (#7782)
    
    Co-authored-by: doleyzi <do...@tencent.com>
---
 .../dataproxy-sdk-twins/dataproxy-sdk-cpp/src/base/proxylist_config.cc  | 2 +-
 .../dataproxy-sdk-twins/dataproxy-sdk-cpp/src/base/sdk_constant.h       | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/inlong-sdk/dataproxy-sdk-twins/dataproxy-sdk-cpp/src/base/proxylist_config.cc b/inlong-sdk/dataproxy-sdk-twins/dataproxy-sdk-cpp/src/base/proxylist_config.cc
index 7e6dcdf1e..1ad00d659 100644
--- a/inlong-sdk/dataproxy-sdk-twins/dataproxy-sdk-cpp/src/base/proxylist_config.cc
+++ b/inlong-sdk/dataproxy-sdk-twins/dataproxy-sdk-cpp/src/base/proxylist_config.cc
@@ -590,7 +590,7 @@ namespace dataproxy_sdk
                 {
                     url = g_config.proxy_URL_ + "/" + groupid2cluster.first;
                 }
-                std::string post_data = "ip=" + g_config.ser_ip_ + "&version=" + constants::kTDBusCAPIVersion;
+                std::string post_data = "ip=" + g_config.ser_ip_ + "&version=" + constants::kTDBusCAPIVersion + "&protocolType=" + constants::kProtocolType;
                 LOG_WARN("get inlong_group_id:%s proxy cfg url:%s, post_data:%s", groupid2cluster.first.c_str(), url.c_str(), post_data.c_str());
 
                 // request proxylist from mananer, if failed multi-times, read from local cache file
diff --git a/inlong-sdk/dataproxy-sdk-twins/dataproxy-sdk-cpp/src/base/sdk_constant.h b/inlong-sdk/dataproxy-sdk-twins/dataproxy-sdk-cpp/src/base/sdk_constant.h
index b95c916ea..28b0b23b9 100644
--- a/inlong-sdk/dataproxy-sdk-twins/dataproxy-sdk-cpp/src/base/sdk_constant.h
+++ b/inlong-sdk/dataproxy-sdk-twins/dataproxy-sdk-cpp/src/base/sdk_constant.h
@@ -94,6 +94,7 @@ namespace dataproxy_sdk
         static const char kBasicAuthPrefix[] = "Basic";
         static const char kBasicAuthSeparator[] = " ";
         static const char kBasicAuthJoiner[] = ":";
+        static const char kProtocolType [] = "TCP";
 
     } // namespace constants