]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
CURLINFO_SCHEME/PROTOCOL: they return the "scheme" for a "transfer"
authorDaniel Stenberg <daniel@haxx.se>
Sat, 8 Nov 2025 16:09:31 +0000 (17:09 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 8 Nov 2025 16:09:50 +0000 (17:09 +0100)
Not protocol. Not for connection.

Closes #19403

docs/libcurl/opts/CURLINFO_PROTOCOL.md
docs/libcurl/opts/CURLINFO_SCHEME.md

index ef9ca6d54e9a6eb8e0b9f1059c79d74f9b9cde84..f254857ca7dba1827a867e876239ba53a3c534e6 100644 (file)
@@ -15,7 +15,7 @@ Added-in: 7.52.0
 
 # NAME
 
-CURLINFO_PROTOCOL - protocol used in the connection
+CURLINFO_PROTOCOL - URL scheme used in transfer
 
 # SYNOPSIS
 
@@ -27,12 +27,12 @@ CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_PROTOCOL, long *p);
 
 # DESCRIPTION
 
-This option is deprecated. We strongly recommend using
-CURLINFO_SCHEME(3) instead, because this option cannot return all
-possible protocols.
+This option is deprecated. We strongly recommend using CURLINFO_SCHEME(3)
+instead, because this option cannot return all possible schemes. The scheme
+might also sometimes be referred to as the protocol.
 
-Pass a pointer to a long to receive the version used in the last http
-connection. The returned value is set to one of these values:
+Pass a pointer to a long to receive the scheme used in the last transfer. The
+returned value is set to one of these values:
 
 ~~~c
 CURLPROTO_DICT, CURLPROTO_FILE, CURLPROTO_FTP, CURLPROTO_FTPS,
@@ -57,8 +57,8 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
     res = curl_easy_perform(curl);
     if(res == CURLE_OK) {
-      long protocol;
-      curl_easy_getinfo(curl, CURLINFO_PROTOCOL, &protocol);
+      long scheme;
+      curl_easy_getinfo(curl, CURLINFO_PROTOCOL, &scheme);
     }
     curl_easy_cleanup(curl);
   }
index 661c8887a373c0d90643414675dcbe27a9bc89d7..5d6288e11cb0e75834b3864ad6eb1cd591a59aac 100644 (file)
@@ -30,8 +30,9 @@ CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SCHEME, char **scheme);
 # DESCRIPTION
 
 Pass a pointer to a char pointer to receive the pointer to a null-terminated
-string holding the URL scheme used for the most recent connection done with
-this CURL **handle**.
+string holding the URL scheme used for the most recent transfer done with this
+CURL **handle**. The scheme might also sometimes be referred to as the
+protocol.
 
 The **scheme** pointer is NULL or points to private memory. You **must not**
 free it. The memory gets freed automatically when you call