(Arpad)
. Fixed bug #55576: Cannot conditionally move uploaded file without race
condition. (Gustavo)
+ . Fixed bug #55504 (Content-Type header is not parsed correctly on
+ HTTP POST request). (Hannes)
- DateTime:
. Fixed bug #48476 (cloning extended DateTime class without calling
}
} else {
/* search for the end of the boundary */
- boundary_end = strchr(boundary, ',');
+ boundary_end = strpbrk(boundary, ",;");
}
if (boundary_end) {
boundary_end[0] = '\0';
--- /dev/null
+--TEST--
+Bug#55504 (Content-Type header is not parsed correctly on HTTP POST request)
+--INI--
+file_uploads=1
+--POST_RAW--
+Content-Type: multipart/form-data; boundary=BVoyv; charset=iso-8859-1
+--BVoyv
+Content-Disposition: form-data; name="data"
+
+abc
+--BVoyv--
+--FILE--
+<?php
+var_dump($_POST);
+?>
+--EXPECT--
+array(1) {
+ ["data"]=>
+ string(3) "abc"
+}
--- /dev/null
+--TEST--
+Bug#55504 (Content-Type header is not parsed correctly on HTTP POST request)
+--INI--
+file_uploads=1
+--POST_RAW--
+Content-Type: multipart/form-data; boundary=BVoyv; charset=iso-8859-1
+--BVoyv
+Content-Disposition: form-data; name="data"
+
+abc
+--BVoyv
+Content-Disposition: form-data; name="data2"
+
+more data
+--BVoyv
+Content-Disposition: form-data; name="data3"
+
+even more data
+--BVoyv--
+--FILE--
+<?php
+var_dump($_POST);
+?>
+--EXPECT--
+array(3) {
+ ["data"]=>
+ string(3) "abc"
+ ["data2"]=>
+ string(9) "more data"
+ ["data3"]=>
+ string(14) "even more data"
+}
--- /dev/null
+--TEST--
+Bug#18792 (no form variables after multipart/form-data)
+--INI--
+file_uploads=1
+--POST_RAW--
+Content-Type: multipart/form-data; boundary=BVoyv, charset=iso-8859-1
+--BVoyv
+Content-Disposition: form-data; name="data"
+
+abc
+--BVoyv--
+--FILE--
+<?php
+var_dump($_POST);
+?>
+--EXPECT--
+array(1) {
+ ["data"]=>
+ string(3) "abc"
+}