Skip to content

Commit 2ed8e0f

Browse files
committed
Code review feedback
1 parent 5dc28ab commit 2ed8e0f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ext/src/http/client/curl/http_operation_curl.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,13 +598,17 @@ int HttpOperation::CurlLoggerCallback(const CURL * /* handle */,
598598
{
599599
OTEL_INTERNAL_LOG_ERROR(text_to_log);
600600
}
601+
// This guard serves as a catch-all block for all other less interesting output that should
602+
// remain available for maintainer internal use and for debugging purposes only.
601603
#ifdef CURL_DEBUG
602604
else
603605
{
604606
OTEL_INTERNAL_LOG_DEBUG(text_to_log);
605607
}
606608
#endif // CURL_DEBUG
607609
}
610+
// Same as above, this guard is meant only for internal use by maintainers, and should not be used
611+
// in production (information leak).
608612
#ifdef CURL_DEBUG
609613
else if (type == CURLINFO_HEADER_OUT)
610614
{
@@ -658,7 +662,7 @@ CURLcode HttpOperation::Setup()
658662
return rc;
659663
}
660664
#else
661-
rc = SetCurlLongOption(CURLOPT_VERBOSE, static_cast<long>(is_log_enabled_ || kEnableCurlLogging));
665+
rc = SetCurlLongOption(CURLOPT_VERBOSE, (is_log_enabled_ && kEnableCurlLogging) ? 1L : 0L);
662666
if (rc != CURLE_OK)
663667
{
664668
return rc;

0 commit comments

Comments
 (0)