summaryrefslogtreecommitdiff
path: root/tests/basic
diff options
context:
space:
mode:
Diffstat (limited to 'tests/basic')
-rw-r--r--tests/basic/030.phpt20
-rw-r--r--tests/basic/031.phpt32
-rw-r--r--tests/basic/032.phpt20
-rw-r--r--tests/basic/bug45986.phpt6
4 files changed, 75 insertions, 3 deletions
diff --git a/tests/basic/030.phpt b/tests/basic/030.phpt
new file mode 100644
index 000000000..cf2a270d2
--- /dev/null
+++ b/tests/basic/030.phpt
@@ -0,0 +1,20 @@
+--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"
+}
diff --git a/tests/basic/031.phpt b/tests/basic/031.phpt
new file mode 100644
index 000000000..12b835428
--- /dev/null
+++ b/tests/basic/031.phpt
@@ -0,0 +1,32 @@
+--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"
+}
diff --git a/tests/basic/032.phpt b/tests/basic/032.phpt
new file mode 100644
index 000000000..a6aba5bb6
--- /dev/null
+++ b/tests/basic/032.phpt
@@ -0,0 +1,20 @@
+--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"
+}
diff --git a/tests/basic/bug45986.phpt b/tests/basic/bug45986.phpt
index 5745d272c..1c30f1040 100644
--- a/tests/basic/bug45986.phpt
+++ b/tests/basic/bug45986.phpt
@@ -1,5 +1,5 @@
--TEST--
-Bug #45986 (wrong error messag for a non existant file on rename)
+Bug #45986 (wrong error message for a non existant file on rename)
--CREDITS--
Sebastian Schürmann
sebs@php.net
@@ -8,5 +8,5 @@ Testfest 2009 Munich
<?php
rename('foo', 'bar');
?>
---EXPECTREGEX--
-.*No such.*
+--EXPECTF--
+Warning: %s in %sbug45986.php on line 2