protocol: use scheme names lowercase

When composing the <scheme>_proxy environment variable, we assume the
handler->scheme name is already lowercase.

This makes unit test 1627 verify that is the case.

Follow-up to c294f9cb56

Spotted by Codex Security

Closes #21033
This commit is contained in:
Daniel Stenberg 2026-03-20 14:28:51 +01:00
parent 0b182ae529
commit 6d1d50d65d
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
2 changed files with 13 additions and 4 deletions

View file

@ -359,7 +359,7 @@ const struct Curl_scheme Curl_scheme_rtsp = {
};
const struct Curl_scheme Curl_scheme_sftp = {
"SFTP", /* scheme */
"sftp", /* scheme */
#ifndef USE_SSH
NULL,
#else
@ -373,7 +373,7 @@ const struct Curl_scheme Curl_scheme_sftp = {
};
const struct Curl_scheme Curl_scheme_scp = {
"SCP", /* scheme */
"scp", /* scheme */
#ifndef USE_SSH
NULL,
#else
@ -468,7 +468,7 @@ const struct Curl_scheme Curl_scheme_tftp = {
};
const struct Curl_scheme Curl_scheme_ws = {
"WS", /* scheme */
"ws", /* scheme */
#if defined(CURL_DISABLE_WEBSOCKETS) || defined(CURL_DISABLE_HTTP)
ZERO_NULL,
#else
@ -482,7 +482,7 @@ const struct Curl_scheme Curl_scheme_ws = {
};
const struct Curl_scheme Curl_scheme_wss = {
"WSS", /* scheme */
"wss", /* scheme */
#if defined(CURL_DISABLE_WEBSOCKETS) || defined(CURL_DISABLE_HTTP) || \
!defined(USE_SSL)
ZERO_NULL,