From 392bff4abf6b177d0770bcb26e43ae5d7addd7c9 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 4 Jan 2020 21:40:49 +0100 Subject: curl: properly free mimepost data ... as it could otherwise leak memory when a transfer failed. Added test 1293 to verify. Reported-by: Brian Carpenter Fixes #4781 Closes #4782 --- tests/data/test1293 | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 tests/data/test1293 (limited to 'tests/data/test1293') diff --git a/tests/data/test1293 b/tests/data/test1293 new file mode 100644 index 000000000..11a28a326 --- /dev/null +++ b/tests/data/test1293 @@ -0,0 +1,67 @@ + + + +HTTP +HTTP GET +-F + + + +# +# Server-side + + +HTTP/1.1 200 OK +Date: Thu, 09 Nov 2010 14:49:00 GMT +Server: test-server/fake +Last-Modified: Tue, 13 Jun 2000 12:10:00 GMT +ETag: "21025-dc7-39462498" +Accept-Ranges: bytes +Content-Length: 6 +Connection: close +Content-Type: text/html +Funny-head: yesyes + +-foo- + + + +# +# Client-side + + +http + + +Multipart formpost to two URLs, the first failing + + +http://0 http://%HOSTIP:%HTTPPORT/1293 -F= + + + +# +# Verify data after the test has been "shot" + + +^User-Agent:.* + + +s/^--------------------------[a-z0-9]*/------------------------------/ +s/boundary=------------------------[a-z0-9]*/boundary=----------------------------/ + + +POST /1293 HTTP/1.1 +Host: 127.0.0.1:8990 +Accept: */* +Content-Length: 126 +Content-Type: multipart/form-data; boundary=---------------------------- + +------------------------------ +Content-Disposition: form-data + + +-------------------------------- + + + -- cgit v1.2.3