;
if(!endct && checkprefix("type=", p)) {
+ size_t tlen;
for(p += 5; ISSPACE(*p); p++)
;
/* set type pointer */
type = p;
/* find end of content-type */
- while(*p && (ISALPHA(*p) || (*p == '/') || (*p == '-')))
- p++;
+ tlen = strcspn(p, "()<>@,;:\\\"[]?=\r\n ");
+ p += tlen;
endct = p;
sep = *p;
}
HTTP RFC1867-type formposting with types on text fields
</name>
<command>
-http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -F "name=daniel;type=moo/foo" -F "html= <body>hello</body>;type=text/html;charset=verymoo"
+http://%HOSTIP:%HTTPPORT/we/want/%TESTNUMBER -F "name=daniel;type=moo/foo-.4" -F "html= <body>hello</body>;type=text/html;charset=verymoo"
</command>
# We create this file before the command is invoked!
</client>
Host: %HOSTIP:%HTTPPORT\r
User-Agent: curl/%VERSION\r
Accept: */*\r
-Content-Length: 338\r
+Content-Length: 341\r
Content-Type: multipart/form-data; boundary=----------------------------212d9006ceb5\r
\r
------------------------------212d9006ceb5\r
Content-Disposition: form-data; name="name"\r
-Content-Type: moo/foo\r
+Content-Type: moo/foo-.4\r
\r
daniel\r
------------------------------212d9006ceb5\r