tool_operate: Fix error codes on bad URL & OOM

curl would erroneously report CURLE_OUT_OF_MEMORY in some cases instead
of CURLE_URL_MALFORMAT. In other cases, it would erroneously return
CURLE_URL_MALFORMAT instead of CURLE_OUT_OF_MEMORY.  Add a test case to
test the former condition.

Fixes #10130
Closes #10414
This commit is contained in:
Dan Fandrich 2023-02-04 16:05:35 -08:00 committed by Daniel Stenberg
parent a0adda4b47
commit 349c5391f2
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
5 changed files with 117 additions and 51 deletions

View file

@ -185,7 +185,7 @@ test1432 test1433 test1434 test1435 test1436 test1437 test1438 test1439 \
test1440 test1441 test1442 test1443 test1444 test1445 test1446 test1447 \
test1448 test1449 test1450 test1451 test1452 test1453 test1454 test1455 \
test1456 test1457 test1458 test1459 test1460 test1461 test1462 test1463 \
test1464 test1465 test1466 test1467 test1468 \
test1464 test1465 test1466 test1467 test1468 test1469 \
\
test1500 test1501 test1502 test1503 test1504 test1505 test1506 test1507 \
test1508 test1509 test1510 test1511 test1512 test1513 test1514 test1515 \

30
tests/data/test1469 Normal file
View file

@ -0,0 +1,30 @@
<testcase>
<info>
<keywords>
FTP
URL
FAILURE
</keywords>
</info>
# Client-side
<client>
<server>
none
</server>
<name>
Space in FTP upload URL
</name>
<command>
"ftp://%HOSTIP:%NOLISTENPORT/%TESTNUMBER%/with space/" -T log/irrelevant-file
</command>
</client>
# Verify data after the test has been "shot"
<verify>
# 3 == CURLE_URL_MALFORMAT
<errorcode>
3
</errorcode>
</verify>
</testcase>