summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2021-11-19 18:54:02 +0100
committerMichael Stahl <michael.stahl@allotropia.de>2021-11-22 10:55:05 +0100
commit6c377dc4a3eaa5384204af1344006257d1c9e59a (patch)
tree31b1469881da0dd9682a246045ed99c665ba5043 /ucb
parentacee9aa28e93945aa5f9b1a8497f296a53b3a72f (diff)
ucb: webdav-curl: log headers in debug_callback
Change-Id: I40ed170c2ae8bc769372fa2269dcf1f1643000de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125580 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/ucp/webdav-curl/CurlSession.cxx16
1 files changed, 12 insertions, 4 deletions
diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx b/ucb/source/ucp/webdav-curl/CurlSession.cxx
index 9fe20d10794f..5e5568a44773 100644
--- a/ucb/source/ucp/webdav-curl/CurlSession.cxx
+++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx
@@ -316,11 +316,19 @@ static int debug_callback(CURL* handle, curl_infotype type, char* data, size_t s
SAL_INFO("ucb.ucp.webdav.curl", "debug log: " << handle << ": " << data);
return 0;
case CURLINFO_HEADER_IN:
- pType = "CURLINFO_HEADER_IN";
- break;
+ SAL_INFO("ucb.ucp.webdav.curl",
+ "CURLINFO_HEADER_IN: " << handle << ": " << OString(data, size));
+ return 0;
case CURLINFO_HEADER_OUT:
- pType = "CURLINFO_HEADER_OUT";
- break;
+ {
+ OString tmp(data, size);
+ if (tmp.startsWith("Authorization: "))
+ {
+ tmp = "Authorization: " + OString::number(tmp.getLength() - 15) + " bytes redacted";
+ }
+ SAL_INFO("ucb.ucp.webdav.curl", "CURLINFO_HEADER_OUT: " << handle << ": " << tmp);
+ return 0;
+ }
case CURLINFO_DATA_IN:
pType = "CURLINFO_DATA_IN";
break;