diff options
author | Patrick Monnerat <patrick@monnerat.net> | 2017-09-05 17:11:59 +0100 |
---|---|---|
committer | Patrick Monnerat <patrick@monnerat.net> | 2017-09-05 17:55:51 +0100 |
commit | 63ef436ea15dd93343a2040ffb7c3bb2c9681b87 (patch) | |
tree | 3d60cf99bb9f54b2511a711b7f2fb4dad15136fd /tests/data/test1404 | |
parent | 3bbe894fd26114e6835c697008b61beeffd084bf (diff) |
mime: implement encoders.
curl_mime_encoder() is operational and documented.
curl tool -F option is extended with ";encoder=".
curl tool --libcurl option generates calls to curl_mime_encoder().
New encoder tests 648 & 649.
Test 1404 extended with an encoder specification.
Diffstat (limited to 'tests/data/test1404')
-rw-r--r-- | tests/data/test1404 | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/data/test1404 b/tests/data/test1404 index a3ec66ef7..20dc01333 100644 --- a/tests/data/test1404 +++ b/tests/data/test1404 @@ -27,13 +27,13 @@ Connection: close http </server> <name> ---libcurl for HTTP RFC1867-type formposting - -F with three files, one with explicit type +--libcurl for HTTP RFC1867-type formposting - -F with 3 files, one with explicit type & encoder </name> <setenv> SSL_CERT_FILE= </setenv> <command> -http://%HOSTIP:%HTTPPORT/we/want/1404 -F name=value -F 'file=@log/test1404.txt,log/test1404.txt;type=magic/content,log/test1404.txt;headers=X-testheader-1: header 1;headers=X-testheader-2: header 2' --libcurl log/test1404.c +http://%HOSTIP:%HTTPPORT/we/want/1404 -F name=value -F 'file=@log/test1404.txt,log/test1404.txt;type=magic/content;encoder=8bit,log/test1404.txt;headers=X-testheader-1: header 1;headers=X-testheader-2: header 2' --libcurl log/test1404.c </command> # We create this file before the command is invoked! <file name="log/test1404.txt"> @@ -51,7 +51,7 @@ POST /we/want/1404 HTTP/1.1 User-Agent: curl/7.18.2 (i686-pc-linux-gnu) libcurl/7.18.2 OpenSSL/0.9.7a ipv6 zlib/1.1.4
Host: %HOSTIP:%HTTPPORT
Accept: */*
-Content-Length: 849
+Content-Length: 882
Content-Type: multipart/form-data; boundary=----------------------------9ef8d6205763
------------------------------9ef8d6205763
@@ -70,6 +70,7 @@ dummy data ------------------------------9ef8d6205763
Content-Disposition: attachment; filename="test1404.txt"
Content-Type: magic/content
+Content-Transfer-Encoding: 8bit
dummy data @@ -131,6 +132,7 @@ int main(int argc, char *argv[]) curl_mime_filedata(part2, "log/test1404.txt"); part2 = curl_mime_addpart(mime2); curl_mime_filedata(part2, "log/test1404.txt"); + curl_mime_encoder(part2, "8bit"); curl_mime_type(part2, "magic/content"); part2 = curl_mime_addpart(mime2); curl_mime_filedata(part2, "log/test1404.txt"); |