| OLD | NEW |
| 1 <?php | 1 <?php |
| 2 header("Content-type: text/html; charset=UTF-8"); | 2 header("Content-type: text/html; charset=UTF-8"); |
| 3 ?> | 3 ?> |
| 4 <html> | 4 <html> |
| 5 <head> | 5 <head> |
| 6 <title>Regression test for bug 20795 and 100445</title> | 6 <title>Regression test for bug 20795 and 100445</title> |
| 7 </head> | 7 </head> |
| 8 <body> | 8 <body> |
| 9 <p> | 9 <p> |
| 10 This is a test for 20795 and 100445, it makes sure that forms POSTed with a cont
ent-type of text/plain actually send data in text/plain | 10 This is a test for 20795 and 100445, it makes sure that forms POSTed with a cont
ent-type of text/plain actually send data in text/plain |
| 11 </p> | 11 </p> |
| 12 <?php | 12 <?php |
| 13 | 13 |
| 14 $content_type = $_SERVER["CONTENT_TYPE"]; | 14 $content_type = $_SERVER["CONTENT_TYPE"]; |
| 15 | 15 |
| 16 if ($content_type == "text/plain") { | 16 if ($content_type == "text/plain") { |
| 17 echo "<p>SUCCESS: Content-type is text/plain.</p>"; | 17 echo "<p>SUCCESS: Content-type is text/plain.</p>"; |
| 18 } else { | 18 } else { |
| 19 echo "<p>FAIL: Content-type should be text/plain, but was '$content_type'</p
>"; | 19 echo "<p>FAIL: Content-type should be text/plain, but was '$content_type'</p
>"; |
| 20 } | 20 } |
| 21 | 21 |
| 22 $data = file_get_contents("php://input"); | 22 $data = file_get_contents("php://input"); |
| 23 | 23 |
| 24 if($data == "f1=This is field #1 &!@$%\r\n='<>\r\nf2=This is field #2 \"\"") { | 24 if($data == "f1=This is field #1 &!@$%\r\n='<>\r\nf2=This is field #2 \"\"\r\n")
{ |
| 25 echo "<p>SUCCESS</p>"; | 25 echo "<p>SUCCESS</p>"; |
| 26 } else { | 26 } else { |
| 27 echo "<p>FAILURE: $data</p>"; | 27 echo "<p>FAILURE: $data</p>"; |
| 28 } | 28 } |
| 29 ?> | 29 ?> |
| 30 <script> | 30 <script> |
| 31 if(window.testRunner) | 31 if(window.testRunner) |
| 32 testRunner.notifyDone(); | 32 testRunner.notifyDone(); |
| 33 </script> | 33 </script> |
| 34 </body> | 34 </body> |
| 35 </html> | 35 </html> |
| OLD | NEW |