chenliangyu 6 месяцев назад
Родитель
Сommit
a2dff0d34e
2 измененных файлов с 8 добавлено и 6 удалено
  1. 5 5
      Framework/Common/httpTrace_define.hpp
  2. 3 1
      Framework/RVCComm/HTTPClient.h

+ 5 - 5
Framework/Common/httpTrace_define.hpp

@@ -4,11 +4,11 @@
 #include <stdio.h>
 
 struct HttpClientTraceLink {
-    char X_B3_BusinessId[32];  // 业务ID
-    char X_B3_TraceId[32];     // 跟踪ID
-    char X_B3_SpanId[16];       // 跨度ID
-    char X_B3_ParentSpanId[16]; // 父跨度ID
-    char X_B3_Timestamp[16];    // 时间戳
+    char X_B3_BusinessId[33];  // 业务ID
+    char X_B3_TraceId[33];     // 跟踪ID
+    char X_B3_SpanId[17];       // 跨度ID
+    char X_B3_ParentSpanId[17]; // 父跨度ID
+    char X_B3_Timestamp[17];    // 时间戳
 };
 
 #endif

+ 3 - 1
Framework/RVCComm/HTTPClient.h

@@ -122,6 +122,7 @@ public:
                       std::string& strText,
                       long& lHTTPStatusCode);
 
+private:
    const bool DownloadFile(const std::string& strLocalFile,
                            const std::string& strURL,
                            long& lHTTPStatusCode);
@@ -129,7 +130,7 @@ public:
    const bool UploadForm(const std::string& strURL,
                          const PostFormInfo& data,
                          long& lHTTPStatusCode);
-
+public:
    inline void AddHeader(const std::string& strHeader)
    {
       m_pHeaderlist = curl_slist_append(m_pHeaderlist, strHeader.c_str());
@@ -153,6 +154,7 @@ public:
    virtual const bool DownloadFileBlock(const char* url, const char* jsonReqStr, fileContentArray& content,
 	   long &httpCode, unordered_map<string, string>& responseHeaders, long timeout);
    
+private:
    // SSL certs
    static const std::string& GetCertificateFile() { return s_strCertificationAuthorityFile; }
    static void SetCertificateFile(const std::string& strPath) { s_strCertificationAuthorityFile = strPath; }