← Commit list

6d1d50d65d

Daniel Stenberg
Daniel Stenberg
2026-03-20
SUCCESS Duration: 257s

Subject

protocol: use scheme names lowercase

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/protocol.c+4 -4
@@ -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,
tests/unit/unit1627.c+9 -0
@@ -25,6 +25,7 @@
#include "urldata.h"
#include "url.h"
+#include "strcase.h"
static CURLcode test_unit1627(const char *arg)
{
@@ -68,6 +69,7 @@ static CURLcode test_unit1627(const char *arg)
(void)arg;
for(i = 0; i < CURL_ARRAYSIZE(okay); i++) {
+ char buffer[32];
const struct Curl_scheme *get = Curl_get_scheme(okay[i]);
if(get) {
/* verify that we got the correct scheme */
@@ -78,6 +80,13 @@ static CURLcode test_unit1627(const char *arg)
curl_mprintf("Input: %s, expected okay\n", okay[i]);
break;
}
+ Curl_strntolower(buffer, okay[i], strlen(okay[i]));
+ buffer[ strlen(okay[i]) ] = 0;
+ if(strcmp(buffer, get->name)) {
+ curl_mprintf("Input: %s is not lowercase: %s\n", buffer, get->name);
+ break;
+ }
+
}
for(j = 0; j < CURL_ARRAYSIZE(notokay); j++) {
const struct Curl_scheme *get = Curl_get_scheme(notokay[j]);