diff options
author | Daniel Stenberg <daniel@haxx.se> | 2021-01-14 16:31:42 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-01-15 08:33:27 +0100 |
commit | 1123a0eb243338d259dc21863b2f2c54e3427782 (patch) | |
tree | 1c3fcd226ea1110af13203578123c78a1a6d5e2e /tests/data | |
parent | b68dc34af341805aeb7b371541a2b4074da76217 (diff) | |
download | curl-1123a0eb243338d259dc21863b2f2c54e3427782.tar.gz |
mime: make sure setting MIMEPOST to NULL resets properly
... so that a function can first use MIMEPOST and then set it to NULL to
reset it back to a blank POST.
Added test 584 to verify the fix.
Reported-by: Christoph M. Becker
Fixes #6455
Closes #6456
Diffstat (limited to 'tests/data')
-rw-r--r-- | tests/data/Makefile.inc | 2 | ||||
-rw-r--r-- | tests/data/test584 | 81 |
2 files changed, 82 insertions, 1 deletions
diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc index d0e6510b9..a6da863fa 100644 --- a/tests/data/Makefile.inc +++ b/tests/data/Makefile.inc @@ -79,7 +79,7 @@ test545 test546 test547 test548 test549 test550 test551 test552 test553 \ test554 test555 test556 test557 test558 test559 test560 test561 test562 \ test563 test564 test565 test566 test567 test568 test569 test570 test571 \ test572 test573 test574 test575 test576 test577 test578 test579 test580 \ -test581 test582 test583 test585 test586 test587 test588 test589 \ +test581 test582 test583 test584 test585 test586 test587 test588 test589 \ test590 test591 test592 test593 test594 test595 test596 test597 test598 \ test599 test600 test601 test602 test603 test604 test605 test606 test607 \ test608 test609 test610 test611 test612 test613 test614 test615 test616 \ diff --git a/tests/data/test584 b/tests/data/test584 new file mode 100644 index 000000000..891e461fc --- /dev/null +++ b/tests/data/test584 @@ -0,0 +1,81 @@ +<testcase> +<info> +<keywords> +HTTP +HTTP POST +HTTP MIME +</keywords> +</info> + +# +# Server-side +<reply> +<data> +HTTP/1.1 200 OK swsclose
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 3
+
+OK +</data> +<datacheck> +HTTP/1.1 200 OK swsclose
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 3
+
+OK +HTTP/1.1 200 OK swsclose
+Date: Thu, 09 Nov 2010 14:49:00 GMT
+Server: test-server/fake
+Content-Length: 3
+
+OK +</datacheck> +</reply> + +# Client-side +<client> +<server> +http +</server> +# tool to invoke +<tool> +lib584 +</tool> + + <name> +CURLOPT_MIMEPOST first set then set to NULL + </name> + <command> +http://%HOSTIP:%HTTPPORT/584 +</command> +</client> + +# +# Verify data after the test has been "shot" +<verify> +<strippart> +s/^--------------------------[a-z0-9]*/--------------------------/ +s/boundary=------------------------[a-z0-9]*/boundary=------------------------/ +</strippart> +<protocol> +POST /584 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+Content-Length: 144
+Content-Type: multipart/form-data; boundary=------------------------
+
+--------------------------
+Content-Disposition: form-data; name="fake"
+
+party
+----------------------------
+POST /584 HTTP/1.1
+Host: %HOSTIP:%HTTPPORT
+Accept: */*
+Content-Length: 0
+
+</protocol> +</verify> +</testcase> |