aboutsummaryrefslogtreecommitdiff
path: root/tests/data
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2011-06-17 22:21:36 +0200
committerDaniel Stenberg <daniel@haxx.se>2011-06-17 22:23:42 +0200
commitf851f768578dc096c561d57ba07ffd1004d504c0 (patch)
treee8acc4af7c02b32b038b425c1185dbb86cec11af /tests/data
parent0126b4a959c43933072a6b9549a7bd45bc606cb0 (diff)
CURLFORM_STREAM: acknowledge CURLFORM_FILENAME
The CURLFORM_STREAM is documented to only insert a file name (and thus look like a file upload) in the part if CURLFORM_FILENAME is set, but in reality it always inserted a filename="" and if CURLFORM_FILENAME wasn't set, it would insert insert rubbish (or possibly crash). This is now fixed to work as documented, and test 554 has been extended to verify this. Reported by: Sascha Swiercy Bug: http://curl.haxx.se/mail/lib-2011-06/0070.html
Diffstat (limited to 'tests/data')
-rw-r--r--tests/data/test55411
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/data/test554 b/tests/data/test554
index 134f7ef97..7fdc353fc 100644
--- a/tests/data/test554
+++ b/tests/data/test554
@@ -39,13 +39,13 @@ s/^------------------------------[a-z0-9]*/------------------------------/
s/boundary=----------------------------[a-z0-9]*/boundary=----------------------------/
</strippart>
# Note that the stripping above removes 12 bytes from every occurance of the
-# boundary string and since 4 of them are in the body contents, we see
-# 415 - (4*12) here == 367 bytes.
+# boundary string and since 5 of them are in the body contents, we see
+# (5*12) == 60 bytes less
<protocol>
POST /554 HTTP/1.1
Host: %HOSTIP:%HTTPPORT
Accept: */*
-Content-Length: 415
+Content-Length: 561
Expect: 100-continue
Content-Type: multipart/form-data; boundary=----------------------------
@@ -55,6 +55,11 @@ Content-Disposition: form-data; name="sendfile"; filename="postit2.c"
this is what we post to the silly web server
------------------------------
+Content-Disposition: form-data; name="callbackdata"
+
+this is what we post to the silly web server
+
+------------------------------
Content-Disposition: form-data; name="filename"
postit2.c