diff options
author | i-ky <gl.ivanovsky@gmail.com> | 2021-09-27 08:22:54 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-09-27 08:28:46 +0200 |
commit | 3363eeb26298b9d30fc5ec29101e5dd205d04db9 (patch) | |
tree | 5546b8dc873a7e918d651485ed735dbce6f69d62 /tests/data | |
parent | f0b8d1c5f646506d5c1fbf73edfbed900aa016e4 (diff) | |
download | curl-3363eeb26298b9d30fc5ec29101e5dd205d04db9.tar.gz |
urlapi: add curl_url_strerror()
Add curl_url_strerror() to convert CURLUcode into readable string and
facilitate easier troubleshooting in programs using URL API.
Extend CURLUcode with CURLU_LAST for iteration in unit tests.
Update man pages with a mention of new function.
Update example code and tests with new functionality where it fits.
Closes #7605
Diffstat (limited to 'tests/data')
-rw-r--r-- | tests/data/test1538 | 19 | ||||
-rw-r--r-- | tests/data/test1559 | 6 |
2 files changed, 22 insertions, 3 deletions
diff --git a/tests/data/test1538 b/tests/data/test1538 index f3754129e..1e5287fe1 100644 --- a/tests/data/test1538 +++ b/tests/data/test1538 @@ -152,6 +152,25 @@ s3: Invalid share handle s4: Out of memory s5: Feature not enabled in this library s6: CURLSHcode unknown +u0: No error +u1: An invalid CURLU pointer was passed as argument +u2: An invalid 'part' argument was passed as argument +u3: A malformed input was passed to a URL API function +u4: The port number was not a decimal number between 0 and 65535 +u5: This libcurl build doesn't support the given URL scheme +u6: URL decode error, most likely because of rubbish in the input +u7: A memory function failed +u8: Credentials was passed in the URL when prohibited +u9: An unknown part ID was passed to a URL API function +u10: There is no scheme part in the URL +u11: There is no user part in the URL +u12: There is no password part in the URL +u13: There is no options part in the URL +u14: There is no host part in the URL +u15: There is no port part in the URL +u16: There is no query part in the URL +u17: There is no fragment part in the URL +u18: CURLUcode unknown </stdout> </verify> diff --git a/tests/data/test1559 b/tests/data/test1559 index 41fdf3af7..6366afb51 100644 --- a/tests/data/test1559 +++ b/tests/data/test1559 @@ -35,9 +35,9 @@ Set excessive URL lengths <stdout> CURLOPT_URL 10000000 bytes URL == 43 CURLOPT_POSTFIELDS 10000000 bytes data == 0 -CURLUPART_URL 10000000 bytes URL == 3 -CURLUPART_SCHEME 10000000 bytes scheme == 3 -CURLUPART_USER 10000000 bytes user == 3 +CURLUPART_URL 10000000 bytes URL == 3 (A malformed input was passed to a URL API function) +CURLUPART_SCHEME 10000000 bytes scheme == 3 (A malformed input was passed to a URL API function) +CURLUPART_USER 10000000 bytes user == 3 (A malformed input was passed to a URL API function) </stdout> </verify> |