Revision 8f93a78175a1c98e6d36bd8293ff5525edd0da91 authored by Jonathon Kereliuk on 03 April 2018, 19:12:01 UTC, committed by Philip Jägenstedt on 03 April 2018, 19:12:01 UTC
1 parent 51b2242
setrequestheader-allow-empty-value.htm
<!DOCTYPE html>
<html>
<head>
<title>XMLHttpRequest: setRequestHeader() - empty header</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel="help" href="https://xhr.spec.whatwg.org/#the-setrequestheader()-method">
</head>
<body>
<div id="log"></div>
<script>
function request(value) {
test(function() {
var client = new XMLHttpRequest()
client.open("POST", "resources/inspect-headers.py?filter_name=X-Empty", false)
client.setRequestHeader('X-Empty', value)
client.send(null)
assert_equals(client.responseText, 'X-Empty: ' + value + '\n' )
}, document.title + " (" + value + ")")
}
request("")
request(null)
request(undefined)
</script>
</body>
</html>
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...