[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 146/264: tests: verify split initial HTTP requests with CURL_SMA
From: |
gnunet |
Subject: |
[gnurl] 146/264: tests: verify split initial HTTP requests with CURL_SMALLREQSEND |
Date: |
Thu, 30 Apr 2020 16:07:29 +0200 |
This is an automated email from the git hooks/post-receive script.
nikita pushed a commit to branch master
in repository gnurl.
commit 741cb81d09db781c975ca263203befd01ccd4840
Author: Daniel Stenberg <address@hidden>
AuthorDate: Tue Apr 7 15:10:37 2020 +0200
tests: verify split initial HTTP requests with CURL_SMALLREQSEND
test1294: "split request" being when the entire request isn't sent in
the first go, and the remainder is sent in the PERFORM state. A GET
request is otherwise not sending anything during PERFORM.
test1295: same kind of split but with POST
Closes #5197
---
tests/data/Makefile.inc | 53 +++++++++++++++++++-------------------
tests/data/test1294 | 65 ++++++++++++++++++++++++++++++++++++++++++++++
tests/data/test1295 | 68 +++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 159 insertions(+), 27 deletions(-)
diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc
index ef3c41c37..543eb28de 100644
--- a/tests/data/Makefile.inc
+++ b/tests/data/Makefile.inc
@@ -150,33 +150,32 @@ test1260 test1261 test1262 test1263 test1264 test1265
test1266 test1267 \
test1268 test1269 test1270 test1271 \
\
test1280 test1281 test1282 test1283 test1284 test1285 test1286 test1287 \
-test1288 test1289 test1290 test1291 test1292 test1293 \
-test1298 test1299 \
-test1300 test1301 test1302 test1303 test1304 test1305 test1306 test1307 \
-test1308 test1309 test1310 test1311 test1312 test1313 test1314 test1315 \
-test1316 test1317 test1318 test1319 test1320 test1321 test1322 test1323 \
-test1324 test1325 test1326 test1327 test1328 test1329 test1330 test1331 \
-test1332 test1333 test1334 test1335 test1336 test1337 test1338 test1339 \
-test1340 test1341 test1342 test1343 test1344 test1345 test1346 test1347 \
-test1348 test1349 test1350 test1351 test1352 test1353 test1354 test1355 \
-test1356 test1357 test1358 test1359 test1360 test1361 test1362 test1363 \
-test1364 test1365 test1366 test1367 test1368 test1369 test1370 test1371 \
-test1372 test1373 test1374 test1375 test1376 test1377 test1378 test1379 \
-test1380 test1381 test1382 test1383 test1384 test1385 test1386 test1387 \
-test1388 test1389 test1390 test1391 test1392 test1393 test1394 test1395 \
-test1396 test1397 test1398 test1399 \
-\
-test1400 test1401 test1402 test1403 test1404 test1405 test1406 test1407 \
-test1408 test1409 test1410 test1411 test1412 test1413 test1414 test1415 \
-test1416 test1417 test1418 test1419 test1420 test1421 test1422 test1423 \
-test1424 test1425 test1426 test1427 \
-test1428 test1429 test1430 test1431 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 \
-test1500 test1501 test1502 test1503 test1504 test1505 test1506 test1507 \
-test1508 test1509 test1510 test1511 test1512 test1513 test1514 test1515 \
-test1516 test1517 test1518 test1519 test1520 test1521 test1522 test1523 \
+test1288 test1289 test1290 test1291 test1292 test1293 test1294 test1295 \
+\
+test1298 test1299 test1300 test1301 test1302 test1303 test1304 test1305 \
+test1306 test1307 test1308 test1309 test1310 test1311 test1312 test1313 \
+test1314 test1315 test1316 test1317 test1318 test1319 test1320 test1321 \
+test1322 test1323 test1324 test1325 test1326 test1327 test1328 test1329 \
+test1330 test1331 test1332 test1333 test1334 test1335 test1336 test1337 \
+test1338 test1339 test1340 test1341 test1342 test1343 test1344 test1345 \
+test1346 test1347 test1348 test1349 test1350 test1351 test1352 test1353 \
+test1354 test1355 test1356 test1357 test1358 test1359 test1360 test1361 \
+test1362 test1363 test1364 test1365 test1366 test1367 test1368 test1369 \
+test1370 test1371 test1372 test1373 test1374 test1375 test1376 test1377 \
+test1378 test1379 test1380 test1381 test1382 test1383 test1384 test1385 \
+test1386 test1387 test1388 test1389 test1390 test1391 test1392 test1393 \
+test1394 test1395 test1396 test1397 test1398 test1399 test1400 test1401 \
+test1402 test1403 test1404 test1405 test1406 test1407 test1408 test1409 \
+test1410 test1411 test1412 test1413 test1414 test1415 test1416 test1417 \
+test1418 test1419 test1420 test1421 test1422 test1423 test1424 test1425 \
+test1426 test1427 test1428 test1429 test1430 test1431 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 test1500 test1501 test1502 test1503 test1504 test1505 \
+test1506 test1507 test1508 test1509 test1510 test1511 test1512 test1513 \
+test1514 test1515 test1516 test1517 test1518 test1519 test1520 test1521 \
+test1522 test1523 \
\
test1525 test1526 test1527 test1528 test1529 test1530 test1531 test1532 \
test1533 test1534 test1535 test1536 test1537 test1538 \
diff --git a/tests/data/test1294 b/tests/data/test1294
new file mode 100644
index 000000000..1c2c0ef95
--- /dev/null
+++ b/tests/data/test1294
@@ -0,0 +1,65 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+
+-foo-
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<features>
+debug
+</features>
+<server>
+http
+</server>
+<name>
+HTTP GET with split initial request send
+</name>
+<setenv>
+# Oliver Twist
+
+# make the first send cut off after this amount of data
+CURL_SMALLREQSEND=128
+</setenv>
+<command>
+http://%HOSTIP:%HTTPPORT/012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679/1294
-H "Among other public buildings in a certain town, which for many reasons it
will be prudent to refrain from mentioning, and to which I will assign no
fictitious name, there is one anciently [...]
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol>
+GET
/012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679/1294
HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+Among other public buildings in a certain town, which for many reasons it will
be prudent to refrain from mentioning, and to which I will assign no fictitious
name, there is one anciently common to most towns, great or small to wit, a
workhouse; and in this workhouse was born; on a day and date which I need not
trouble myself to repeat, inasmuch as it can be of no possible consequence to
the reader, in this stage of the business at all events; the item of mortality
whose name is prefixed [...]
+
+</protocol>
+</verify>
+</testcase>
diff --git a/tests/data/test1295 b/tests/data/test1295
new file mode 100644
index 000000000..b929e3c6d
--- /dev/null
+++ b/tests/data/test1295
@@ -0,0 +1,68 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP POST
+</keywords>
+</info>
+
+#
+# Server-side
+<reply>
+<data>
+HTTP/1.1 200 OK
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT
+ETag: "21025-dc7-39462498"
+Accept-Ranges: bytes
+Content-Length: 6
+Connection: close
+Content-Type: text/html
+Funny-head: yesyes
+
+-foo-
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+<features>
+debug
+</features>
+<server>
+http
+</server>
+<name>
+HTTP POST with split initial request send
+</name>
+<setenv>
+# The Hound of the Baskervilles
+#
+# make the first send cut off after this amount of data
+CURL_SMALLREQSEND=100
+</setenv>
+<command>
+http://%HOSTIP:%HTTPPORT/012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679/1295
-H
"0123456790123456790123456790123456790123456790123456790123456790123456790123456790123456790123456790123456790123456790123456790123456790123456790123456790123456790123456790123456790123456
[...]
+</command>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+<protocol nonewline="yes">
+POST
/012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679/1295
HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679012345679:
300
+Content-Length: 165
+Content-Type: application/x-www-form-urlencoded
+
+Mr. Sherlock Holmes, who was usually very late in the mornings, save upon
those not infrequent occasions when he was up all night, was seated at the
breakfast table.
+</protocol>
+</verify>
+</testcase>
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [gnurl] 258/264: nss: check for PK11_CreateDigestContext() returning NULL, (continued)
- [gnurl] 258/264: nss: check for PK11_CreateDigestContext() returning NULL, gnunet, 2020/04/30
- [gnurl] 151/264: runtests: fix warning about using an undefined variable, gnunet, 2020/04/30
- [gnurl] 153/264: url: allow non-HTTPS altsvc-matching for debug builds, gnunet, 2020/04/30
- [gnurl] 174/264: schannel: Fix blocking timeout logic, gnunet, 2020/04/30
- [gnurl] 123/264: test1566: verify --etag-compare that gets a 304 back, gnunet, 2020/04/30
- [gnurl] 158/264: test1148: tolerate progress updates better (again), gnunet, 2020/04/30
- [gnurl] 149/264: github actions: run when pushed to master or */ci + PRs, gnunet, 2020/04/30
- [gnurl] 185/264: tests: add four MQTT tests 1190 - 1193, gnunet, 2020/04/30
- [gnurl] 189/264: scripts/release-notes: fix duplicate output header, gnunet, 2020/04/30
- [gnurl] 121/264: curl: allow both --etag-compare and --etag-save with same file name, gnunet, 2020/04/30
- [gnurl] 146/264: tests: verify split initial HTTP requests with CURL_SMALLREQSEND,
gnunet <=
- [gnurl] 212/264: test1245: make it work with dynamic FTP server port, gnunet, 2020/04/30
- [gnurl] 245/264: test1154: set a proper name, gnunet, 2020/04/30
- [gnurl] 147/264: schannel: support .P12 or .PFX client certificates, gnunet, 2020/04/30
- [gnurl] 163/264: tests: fix conflict between Cygwin/msys and Windows PIDs, gnunet, 2020/04/30
- [gnurl] 155/264: appveyor: ignore failing 'connect to non-listening proxy' tests, gnunet, 2020/04/30
- [gnurl] 160/264: Revert "file: on Windows, refuse paths that start with \\", gnunet, 2020/04/30
- [gnurl] 192/264: test2043: use revoked.badssl.com instead of revoked.grc.com, gnunet, 2020/04/30
- [gnurl] 170/264: tests/server: add hidden window to gracefully handle WM_CLOSE, gnunet, 2020/04/30
- [gnurl] 22/264: TODO: TLS-PSK with OpenSSL, gnunet, 2020/04/30
- [gnurl] 40/264: multi: Improve parameter check for curl_multi_remove_handle, gnunet, 2020/04/30