summaryrefslogtreecommitdiff
path: root/tests/libtest
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-06-23 23:17:25 +0200
committerDaniel Stenberg <daniel@haxx.se>2020-06-26 15:11:04 +0200
commit1529838a14e72fc7b1f2bcb561ea1b1a785975e4 (patch)
tree0909691b6fe6d8aa2a91871c87f0c5199b7e3e3a /tests/libtest
parent989e6dffc583118e6b582be37dc193ebcbf2d5aa (diff)
downloadcurl-1529838a14e72fc7b1f2bcb561ea1b1a785975e4.tar.gz
test1539: do a HTTP 1.0 POST without a set size (fails)
Attempt to reproduce #5593. Test case 1514 is very similar but uses HTTP/1.1 and thus switches to chunked. Closes #5595
Diffstat (limited to 'tests/libtest')
-rw-r--r--tests/libtest/Makefile.inc6
-rw-r--r--tests/libtest/lib1514.c4
2 files changed, 9 insertions, 1 deletions
diff --git a/tests/libtest/Makefile.inc b/tests/libtest/Makefile.inc
index 7ca47ebf3..f29bf6aee 100644
--- a/tests/libtest/Makefile.inc
+++ b/tests/libtest/Makefile.inc
@@ -53,7 +53,7 @@ noinst_PROGRAMS = chkhostname libauthretry libntlmconnect \
lib1509 lib1510 lib1511 lib1512 lib1513 lib1514 lib1515 lib1517 \
lib1518 lib1520 lib1521 lib1522 lib1523 \
lib1525 lib1526 lib1527 lib1528 lib1529 lib1530 lib1531 lib1532 lib1533 \
- lib1534 lib1535 lib1536 lib1537 lib1538 \
+ lib1534 lib1535 lib1536 lib1537 lib1538 lib1539 \
lib1540 lib1541 \
lib1550 lib1551 lib1552 lib1553 lib1554 lib1555 lib1556 lib1557 \
lib1558 lib1559 lib1560 lib1564 lib1565 \
@@ -542,6 +542,10 @@ lib1538_SOURCES = lib1538.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
lib1538_LDADD = $(TESTUTIL_LIBS)
lib1538_CPPFLAGS = $(AM_CPPFLAGS)
+lib1539_SOURCES = lib1514.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
+lib1539_LDADD = $(TESTUTIL_LIBS)
+lib1539_CPPFLAGS = $(AM_CPPFLAGS) -DLIB1539
+
lib1540_SOURCES = lib1540.c $(SUPPORTFILES) $(TESTUTIL) $(WARNLESS)
lib1540_LDADD = $(TESTUTIL_LIBS)
lib1540_CPPFLAGS = $(AM_CPPFLAGS)
diff --git a/tests/libtest/lib1514.c b/tests/libtest/lib1514.c
index d01a5d4fb..dd84d109f 100644
--- a/tests/libtest/lib1514.c
+++ b/tests/libtest/lib1514.c
@@ -68,6 +68,10 @@ int test(char *URL)
/* Purposely omit to set CURLOPT_POSTFIELDSIZE */
easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
easy_setopt(curl, CURLOPT_READDATA, &pooh);
+#ifdef LIB1539
+ /* speak HTTP 1.0 - no chunked! */
+ easy_setopt(curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
+#endif
result = curl_easy_perform(curl);