curl/tests/data/test1221
Daniel Stenberg 675a9b0189
urlapi: change more lowercase percent-encoded to uppercase
For consistency with other code, prefer uppercase.

Verified by test 1628
Reported-by: Fabian Keil
URL: https://curl.se/mail/lib-2026-05/0006.html
Closes #21592
2026-05-13 16:47:05 +02:00

57 lines
1.1 KiB
XML

<?xml version="1.0" encoding="US-ASCII"?>
<testcase>
<info>
<keywords>
HTTP
HTTP POST
--data-urlencode
--url-query
</keywords>
</info>
# Server-side
<reply>
<data crlf="headers">
HTTP/1.1 200 I am cool swsclose
Server: Cool server/10.0
Content-Length: 0
</data>
</reply>
# Client-side
<client>
<server>
http
</server>
<name>
--url-query with --data-urlencode
</name>
<command>
http://%HOSTIP:%HTTPPORT/%TESTNUMBER
--url-query "my name is moo[]"
--url-query "yes=s i r"
--url-query "v_alue@%LOGDIR/%TESTNUMBER.txt"
--url-query @%LOGDIR/%TESTNUMBER.txt
--url-query "+%3d%3d"
--data-urlencode "start=once upon the time"
</command>
<file name="%LOGDIR/%TESTNUMBER.txt">
content to _?!#$'|%LT%GT
</file>
</client>
# Verify data after the test has been "shot"
<verify>
<protocol crlf="yes" nonewline="yes">
POST /%TESTNUMBER?my+name+is+moo%5B%5D%AMPyes=s+i+r%AMPv_alue=content+to+_%3F%21%23%24%27%7C%3C%3E%0A%AMPcontent+to+_%3F%21%23%24%27%7C%3C%3E%0A%AMP%3D%3D HTTP/1.1
Host: %HOSTIP:%HTTPPORT
User-Agent: curl/%VERSION
Accept: */*
Content-Length: 24
Content-Type: application/x-www-form-urlencoded
start=once+upon+the+time
</protocol>
</verify>
</testcase>