test757: MIME parts reused as a child part, using data_cb

An attempt to reproduce #18070. That turned out to not be a bug, but the
test is still a good one.

Based on test695

Closes #18101
This commit is contained in:
Daniel Stenberg 2025-07-30 14:32:36 +02:00
parent 98bcb885fe
commit f028667131
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
4 changed files with 215 additions and 1 deletions

View file

@ -108,7 +108,7 @@ test718 test719 test720 test721 test722 test723 test724 test725 test726 \
test727 test728 test729 test730 test731 test732 test733 test734 test735 \
test736 test737 test738 test739 test740 test741 test742 test743 test744 \
test745 test746 test747 test748 test749 test750 test751 test752 test753 \
test754 test755 test756 \
test754 test755 test756 test757 \
test780 test781 test782 test783 test784 test785 test786 test787 test788 \
test789 test790 test791 test792 test793 \
\

78
tests/data/test757 Normal file
View file

@ -0,0 +1,78 @@
<testcase>
<info>
<keywords>
MIME
</keywords>
</info>
# Server-side
<reply>
<data nocheck="yes">
HTTP/1.0 200 OK swsclose
Date: Tue, 09 Nov 2010 14:49:00 GMT
Server: test-server/fake
blablabla
</data>
</reply>
# Client-side
<client>
<features>
Mime
</features>
<server>
http
</server>
<tool>
lib%TESTNUMBER
</tool>
<name>
MIME parts reused as a child part, using data_cb
</name>
<command>
http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER
</command>
</client>
# Verify data after the test has been "shot"
<verify>
<strippart>
s/^--------------------------[A-Za-z0-9]*/------------------------------/
s/boundary=------------------------[A-Za-z0-9]*/boundary=----------------------------/
</strippart>
<protocol>
POST /we/want/%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*
Content-Length: 200
Content-Type: multipart/form-data; boundary=----------------------------
------------------------------
Content-Disposition: form-data; name="data"
Content-Type: text/html
<title>fun-times</title>
--------------------------------
POST /we/want/%TESTNUMBER HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*
Content-Length: 427
Content-Type: multipart/form-data; boundary=----------------------------
------------------------------
Content-Disposition: form-data
Content-Type: multipart/mixed; boundary=----------------------------
------------------------------
Content-Disposition: attachment; name="data"
Content-Type: text/html
<title>fun-times</title>
--------------------------------
--------------------------------
</protocol>
</verify>
</testcase>