]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
docs: explain curl_easy_escape/unescape curl handle is ignored
authorJay Satiro <raysatiro@yahoo.com>
Fri, 8 Jul 2022 06:04:35 +0000 (02:04 -0400)
committerJay Satiro <raysatiro@yahoo.com>
Sun, 10 Jul 2022 06:59:58 +0000 (02:59 -0400)
26101421 (precedes 7.82.0) removed character conversion support used by
very old legacy operating systems and since then the curl handle passed
to curl_easy_escape/unescape is always ignored.

Bug: https://github.com/curl/curl/discussions/9115
Reported-by: Ted Lyngmo
Closes https://github.com/curl/curl/pull/9121

docs/libcurl/curl_easy_escape.3
docs/libcurl/curl_easy_unescape.3
lib/escape.c

index 35ad2cb33f5d75a9fdf28abfc08a66faa546e343..307982ecf09dad5a9a9354edad66b13c76346262 100644 (file)
@@ -41,6 +41,10 @@ If \fIlength\fP is set to 0 (zero), \fIcurl_easy_escape(3)\fP uses strlen() on
 the input \fIstring\fP to find out the size. This function does not accept
 input strings longer than \fBCURL_MAX_INPUT_LENGTH\fP (8 MB).
 
+Since 7.82.0, the \fBcurl\fP parameter is ignored. Prior to that there was
+per-handle character conversion support for some very old operating systems
+such as TPF, but it was otherwise ignored.
+
 You must \fIcurl_free(3)\fP the returned string when you are done with it.
 .SH ENCODING
 libcurl is typically not aware of, nor does it care about, character
index ef11fadb1cc086af7af84ba721eb61f5185acbe5..6729cbc5f948603ec228fcaab56eb076fa7ed6ae 100644 (file)
@@ -48,6 +48,10 @@ pointer to an \fIint\fP type, it can only return a value up to INT_MAX so no
 longer string can be unescaped if the string length is returned in this
 parameter.
 
+Since 7.82.0, the \fBcurl\fP parameter is ignored. Prior to that there was
+per-handle character conversion support for some very old operating systems
+such as TPF, but it was otherwise ignored.
+
 You must \fIcurl_free(3)\fP the returned string when you are done with it.
 .SH EXAMPLE
 .nf
index d50e515b41c46ad24cc4b765dd33010963e6b37b..da7e5524f724991b9e8c76fb743910aca98e72ed 100644 (file)
@@ -77,6 +77,9 @@ char *curl_unescape(const char *string, int length)
   return curl_easy_unescape(NULL, string, length, NULL);
 }
 
+/* Escapes for URL the given unescaped string of given length.
+ * 'data' is ignored since 7.82.0.
+ */
 char *curl_easy_escape(struct Curl_easy *data, const char *string,
                        int inlength)
 {
@@ -191,6 +194,7 @@ CURLcode Curl_urldecode(const char *string, size_t length,
  * pointer to a malloced string with length given in *olen.
  * If length == 0, the length is assumed to be strlen(string).
  * If olen == NULL, no output length is stored.
+ * 'data' is ignored since 7.82.0.
  */
 char *curl_easy_unescape(struct Curl_easy *data, const char *string,
                          int length, int *olen)