2 header("Content-type: text/html; charset=UTF-8");
6 <title
>Regression test
for bug
20795 and 100445</title
>
10 This is a test
for 20795 and 100445, it makes sure that forms POSTed with a content
-type of text
/plain actually send data in text
/plain
14 $content_type = $_SERVER["CONTENT_TYPE"];
16 if ($content_type == "text/plain") {
17 echo "<p>SUCCESS: Content-type is text/plain.</p>";
19 echo "<p>FAIL: Content-type should be text/plain, but was '$content_type'</p>";
22 $data = file_get_contents("php://input");
24 if($data == "f1=This is field #1 &!@$%\r\n='<>\r\nf2=This is field #2 \"\"") {
25 echo "<p>SUCCESS</p>";
27 echo "<p>FAILURE: $data</p>";
32 testRunner
.notifyDone();