| <html> |
| <head> |
| <meta http-equiv="content-type" content="text/html;charset=koi8-r"> |
| <body> |
| <p>Test for <a href="http://bugs.webkit.org/show_bug.cgi?id=12099">bug 12099</a>: |
| XMLHttpRequest shouldn't honor a charset specified via setRequestHeader.</p> |
| <div id=result>FAIL: script didn't run to completion.</div> |
| <script> |
| |
| if (window.testRunner) |
| testRunner.dumpAsText(); |
| |
| req = new XMLHttpRequest; |
| req.open("POST", "resources/post-echo-as-utf-8.cgi", false); |
| req.setRequestHeader("Content-Type", "text/plain; charset='windows-1251'"); |
| req.send("ðÒÏ×ÅÒËÁ"); |
| if (req.responseText == "ðÒÏ×ÅÒËÁ") |
| document.getElementById("result").firstChild.data = "SUCCESS"; |
| else |
| document.getElementById("result").firstChild.data = "FAILURE: '" + req.responseText + "'"; |
| |
| </script> |
| </body> |
| </html> |