OLD | NEW |
(Empty) | |
| 1 <!doctype html> |
| 2 <head> |
| 3 <script src = "../../resources/testharness.js"></script> |
| 4 <script src = "../../resources/testharnessreport.js"></script> |
| 5 </head> |
| 6 <body> |
| 7 <script> |
| 8 // Header values with control octets that will be rejected by RFC 7230. |
| 9 // https://crbug.com/455099 |
| 10 async_test(function(t) { |
| 11 var xhr = new XMLHttpRequest; |
| 12 xhr.open("GET", "../resources/print-headers.cgi"); |
| 13 |
| 14 xhr.setRequestHeader('test1', 'a\x01b'); |
| 15 |
| 16 xhr.onload = t.step_func(function() { |
| 17 // This expectation must be updated once we update header value checks. |
| 18 assert_regexp_match(xhr.responseText, /HTTP_TEST1: a\x01b\r?\n/, |
| 19 'Whitespaces remains in the middle of the header value.'); |
| 20 t.done(); |
| 21 }); |
| 22 xhr.onerror = t.unreached_func('should not fail'); |
| 23 xhr.send(); |
| 24 }, 'setRequestHeader() with control octets'); |
| 25 |
| 26 done(); |
| 27 </script> |
| 28 </body> |
OLD | NEW |