|
1 <!DOCTYPE HTML> |
|
2 <html> |
|
3 <!-- |
|
4 https://bugzilla.mozilla.org/show_bug.cgi?id=393968 |
|
5 --> |
|
6 <head> |
|
7 <title>Test for Bug 393968</title> |
|
8 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
|
9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> |
|
10 </head> |
|
11 <body> |
|
12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=393968">Mozilla Bug 393968</a> |
|
13 <p id="display"></p> |
|
14 <div id="content" style="display: none"> |
|
15 |
|
16 </div> |
|
17 <pre id="test"> |
|
18 <script class="testbody" type="text/javascript"> |
|
19 |
|
20 /** Test for Bug 393968 **/ |
|
21 var req = new XMLHttpRequest(); |
|
22 req.open("POST", window.location.href); |
|
23 req.setRequestHeader("Content-Type", "text/plain; charset=us-ascii; boundary=01234567890"); |
|
24 req.send("Some text"); |
|
25 |
|
26 is(SpecialPowers.wrap(req).channel |
|
27 .QueryInterface(SpecialPowers.Ci.nsIHttpChannel) |
|
28 .getRequestHeader("Content-Type"), |
|
29 "text/plain; charset=UTF-8; boundary=01234567890", |
|
30 "Headers should match"); |
|
31 |
|
32 </script> |
|
33 </pre> |
|
34 </body> |
|
35 </html> |
|
36 |