]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
test1460: verify that -Ji is not ok
authorDaniel Stenberg <daniel@haxx.se>
Sun, 31 May 2020 21:10:22 +0000 (23:10 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 21 Jun 2020 22:50:08 +0000 (00:50 +0200)
tests/data/Makefile.inc
tests/data/test1460 [new file with mode: 0644]

index d6f7915be5c57537b949c280f21bb5d29ca684cd..ecb5091ba95416112f16d3ad52419a9cc003a2a5 100644 (file)
@@ -177,7 +177,9 @@ 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 \
+test1458 test1459 test1460 \
+\
+test1500 test1501 test1502 test1503 test1504 test1505 \
 test1506 test1507 test1508 test1509 test1510 test1511 test1512 test1513 \
 test1514 test1515 test1516 test1517 test1518 test1519 test1520 test1521 \
 test1522 test1523 test1524 \
diff --git a/tests/data/test1460 b/tests/data/test1460
new file mode 100644 (file)
index 0000000..d7b30c5
--- /dev/null
@@ -0,0 +1,62 @@
+<testcase>
+<info>
+<keywords>
+HTTP
+HTTP GET
+-J
+</keywords>
+</info>
+
+#
+<reply>
+<data nocheck="yes">
+HTTP/1.1 200 swsclose
+  12345
+fooo
+54 3 2 1
+Content-Disposition: filename=name1460; charset=funny; option=strange
+
+</data>
+</reply>
+
+#
+# Client-side
+<client>
+# this relies on the debug feature to allow us to set directory to store the
+# -J output in
+<features>
+debug
+</features>
+<server>
+http
+</server>
+<name>
+HTTP GET with -Ji and Content-Disposition with existing file
+</name>
+<setenv>
+CURL_TESTDIR=%PWD/log
+</setenv>
+<command option="no-output,no-include">
+http://%HOSTIP:%HTTPPORT/1460 -Ji -O
+</command>
+<file name="log/name1460">
+initial content
+</file>
+</client>
+
+#
+# Verify data after the test has been "shot"
+<verify>
+<strip>
+^User-Agent:.*
+</strip>
+# Warning: --include and --remote-header-name cannot be combined.
+<errorcode>
+2
+</errorcode>
+<file name="log/name1460">
+initial content
+</file>
+
+</verify>
+</testcase>