]> granicus.if.org Git - curl/commitdiff
formpost: use semicolon in multipart/mixed
authorDaniel Stenberg <daniel@haxx.se>
Fri, 7 Feb 2014 08:39:50 +0000 (09:39 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 7 Feb 2014 08:43:36 +0000 (09:43 +0100)
Not comma, which is an inconsistency and a mistake probably inherited
from the examples section of RFC1867.

This bug has been present since the day curl started to support
multipart formposts, back in the 90s.

Reported-by: Rob Davies
Bug: http://curl.haxx.se/bug/view.cgi?id=1333

lib/formdata.c
tests/data/test1133

index 4cb3e7a485f28fd1bc3265f190fde37625b5c5ed..bdca3e770368f2a3c86cca9aa52626cdc0d2fd60 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -1227,7 +1227,7 @@ CURLcode Curl_getformdata(struct SessionHandle *data,
       }
 
       result = AddFormDataf(&form, &size,
-                            "\r\nContent-Type: multipart/mixed,"
+                            "\r\nContent-Type: multipart/mixed;"
                             " boundary=%s\r\n",
                             fileboundary);
       if(result)
index 73379311483b78f99bc76803e7ce939f5d2f647a..8b016fc14a66df26400c7826a3d3c803c2279030 100644 (file)
@@ -40,7 +40,7 @@ foo
 # Verify data after the test has been "shot"
 <verify>
 <strip>
-^(User-Agent:|Content-Type: multipart/form-data;|Content-Type: multipart/mixed, boundary=|-------).*
+^(User-Agent:|Content-Type: multipart/form-data;|Content-Type: multipart/mixed; boundary=|-------).*
 </strip>
 <protocol>
 POST /we/want/1133 HTTP/1.1\r
@@ -71,7 +71,7 @@ foo
 \r
 ------------------------------24e78000bd32\r
 Content-Disposition: form-data; name="file3"\r
-Content-Type: multipart/mixed, boundary=----------------------------7f0e85a48b0b\r
+Content-Type: multipart/mixed; boundary=----------------------------7f0e85a48b0b\r
 \r
 Content-Disposition: attachment; filename="test1133,a\"nd;.txt"\r
 Content-Type: m/f\r