test1221: verify --url-query

This commit is contained in:
Daniel Stenberg 2022-11-05 00:10:25 +01:00
parent b6e1afd069
commit 633493947f
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
2 changed files with 59 additions and 7 deletions

View File

@ -148,13 +148,12 @@ test1152 test1153 test1154 test1155 test1156 test1157 test1158 test1159 \
test1160 test1161 test1162 test1163 test1164 test1165 test1166 test1167 \
test1168 test1169 test1170 test1171 test1172 test1173 test1174 test1175 \
test1176 test1177 test1178 test1179 test1180 test1181 test1182 test1183 \
test1184 test1185 test1186 test1187 test1188 test1189 \
\
test1190 test1191 test1192 test1193 test1194 test1195 test1196 test1197 \
test1198 test1199 \
test1200 test1201 test1202 test1203 test1204 test1205 test1206 test1207 \
test1208 test1209 test1210 test1211 test1212 test1213 test1214 test1215 \
test1216 test1217 test1218 test1219 test1220 test1223 \
test1184 test1185 test1186 test1187 test1188 test1189 test1190 test1190 \
test1191 test1192 test1193 test1194 test1195 test1196 test1197 test1198 \
test1199 test1200 test1201 test1202 test1203 test1204 test1205 test1206 \
test1207 test1208 test1209 test1210 test1211 test1212 test1213 test1214 \
test1215 test1216 test1217 test1218 test1219 test1220 test1221 \
test1223 \
test1224 test1225 test1226 test1227 test1228 test1229 test1230 test1231 \
test1232 test1233 test1234 test1235 test1236 test1237 test1238 test1239 \
test1240 test1241 test1242 test1243 test1244 test1245 test1246 test1247 \

53
tests/data/test1221 Normal file
View File

@ -0,0 +1,53 @@
<testcase>
<info>
<keywords>
HTTP
HTTP POST
--data-urlencode
--url-query
</keywords>
</info>
#
# Server-side
<reply>
<data>
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@log/%TESTNUMBER.txt" --url-query @log/%TESTNUMBER.txt --url-query "+%3d%3d" --data-urlencode "start=once upon the time"
</command>
<file name="log/%TESTNUMBER.txt">
content to _?!#$'|<>
</file>
</client>
#
# Verify data after the test has been "shot"
<verify>
<protocol nonewline="yes">
POST /%TESTNUMBER?my+name+is+moo%5b%5d&yes=s+i+r&v_alue=content+to+_%3f%21%23%24%27%7c%3c%3e%0a&content+to+_%3f%21%23%24%27%7c%3c%3e%0a&%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>