diff options
author | Jay Satiro <raysatiro@yahoo.com> | 2022-07-08 02:04:35 -0400 |
---|---|---|
committer | Jay Satiro <raysatiro@yahoo.com> | 2022-07-10 02:59:58 -0400 |
commit | eab25898b36c727236358b2395d53241b31e06ba (patch) | |
tree | f2d9ab3391eca487ce305d406f9a72e1936201c3 | |
parent | 9153ba708be87ed6e7c25e1b4864f86fadeb95ad (diff) | |
download | curl-eab25898b36c727236358b2395d53241b31e06ba.tar.gz |
docs: explain curl_easy_escape/unescape curl handle is ignored
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
-rw-r--r-- | docs/libcurl/curl_easy_escape.3 | 4 | ||||
-rw-r--r-- | docs/libcurl/curl_easy_unescape.3 | 4 | ||||
-rw-r--r-- | lib/escape.c | 4 |
3 files changed, 12 insertions, 0 deletions
diff --git a/docs/libcurl/curl_easy_escape.3 b/docs/libcurl/curl_easy_escape.3 index 35ad2cb33..307982ecf 100644 --- a/docs/libcurl/curl_easy_escape.3 +++ b/docs/libcurl/curl_easy_escape.3 @@ -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 diff --git a/docs/libcurl/curl_easy_unescape.3 b/docs/libcurl/curl_easy_unescape.3 index ef11fadb1..6729cbc5f 100644 --- a/docs/libcurl/curl_easy_unescape.3 +++ b/docs/libcurl/curl_easy_unescape.3 @@ -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 diff --git a/lib/escape.c b/lib/escape.c index d50e515b4..da7e5524f 100644 --- a/lib/escape.c +++ b/lib/escape.c @@ -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) |