File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,6 +71,21 @@ static void ddtrace_store_env(char **target, const char *value) {
7171 }
7272}
7373
74+ /* Snapshot the proxy-related environment variables curl itself consults.
75+ *
76+ * Generic pattern in libcurl (see url.c):
77+ * - For scheme-specific proxies, it looks up "<scheme>_proxy" in lowercase
78+ * first and, for most schemes, falls back to the uppercase variant
79+ * (e.g., "https_proxy" then "HTTPS_PROXY"). If no scheme-specific proxy
80+ * is found, it falls back to "all_proxy"/"ALL_PROXY".
81+ * - For the no-proxy list, it consults both "no_proxy" and "NO_PROXY".
82+ *
83+ * There is a special case in libcurl for HTTP: to avoid header-based
84+ * injection in CGI/server contexts, it does *not* automatically fall back
85+ * from "http_proxy" to "HTTP_PROXY". We still snapshot both here, but when
86+ * we later configure our agent handle we only ever use the cached value
87+ * explicitly, not libcurl's own HTTP_PROXY fallback.
88+ */
7489void ddtrace_coms_minit_proxy_env (void ) {
7590 const char * v ;
7691
You can’t perform that action at this time.
0 commit comments