[Cmake-commits] CMake branch, next, updated. v3.2.2-3244-g9a9d15c

Brad King brad.king at kitware.com
Thu May 28 11:11:41 EDT 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  9a9d15cc2be5a314e3156f2e7b2a173cc9b4f4e1 (commit)
       via  eba12a43615ee603f7e90a8e4e8c7669e7d63cf8 (commit)
      from  f30279f35efef676c3dd74a69b05a91fc7692123 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9a9d15cc2be5a314e3156f2e7b2a173cc9b4f4e1
commit 9a9d15cc2be5a314e3156f2e7b2a173cc9b4f4e1
Merge: f30279f eba12a4
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu May 28 11:11:41 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu May 28 11:11:41 2015 -0400

    Merge topic 'file-log-less-data' into next
    
    eba12a43 cmFileCommand: Do not log raw protocol data from curl (#15589)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eba12a43615ee603f7e90a8e4e8c7669e7d63cf8
commit eba12a43615ee603f7e90a8e4e8c7669e7d63cf8
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu May 28 10:54:39 2015 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu May 28 11:11:28 2015 -0400

    cmFileCommand: Do not log raw protocol data from curl (#15589)
    
    Teach cmFileCommandCurlDebugCallback to filter the debug data by type
    and show only summary information instead of the raw data.  This avoids
    allocating memory for all data transferred by UPLOAD or DOWNLOAD.

diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 2c2c1c0..4698468 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -2798,13 +2798,36 @@ namespace {
 
 
   static size_t
-  cmFileCommandCurlDebugCallback(CURL *, curl_infotype, char *chPtr,
+  cmFileCommandCurlDebugCallback(CURL *, curl_infotype type, char *chPtr,
                                  size_t size, void *data)
     {
     cmFileCommandVectorOfChar *vec
       = static_cast<cmFileCommandVectorOfChar*>(data);
-    vec->insert(vec->end(), chPtr, chPtr + size);
-    return size;
+    switch(type)
+      {
+      case CURLINFO_TEXT:
+      case CURLINFO_HEADER_IN:
+      case CURLINFO_HEADER_OUT:
+        vec->insert(vec->end(), chPtr, chPtr + size);
+        break;
+      case CURLINFO_DATA_IN:
+      case CURLINFO_DATA_OUT:
+      case CURLINFO_SSL_DATA_IN:
+      case CURLINFO_SSL_DATA_OUT:
+        {
+        char buf[128];
+        int n = sprintf(buf, "[%" cmIML_INT_PRIu64 " bytes data]\n",
+                        static_cast<cmIML_INT_uint64_t>(size));
+        if (n > 0)
+          {
+          vec->insert(vec->end(), buf, buf + n);
+          }
+        }
+        break;
+      default:
+        break;
+      }
+    return 0;
     }
 
 

-----------------------------------------------------------------------

Summary of changes:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list