blob: d4aac1d2aa615449b3ce82f31c77fba543311985 [file] [log] [blame]
<html>
<head>
<title> Page test for bug 14898</title>
</head>
<body>
<p>Test page for the <a href="http://bugs.webkit.org/show_bug.cgi?id=14898">bug 14898</a> : XMLHttpRequest.getAllResponseHeaders should separate headers with CRLF</p>
<script type="text/javascript">
if (window.layoutTestController)
layoutTestController.dumpAsText();
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if (this.readyState == 4) {
var responses = this.getAllResponseHeaders();
if (responses == null || responses == "") { //Check that headers were received
document.body.appendChild(document.createTextNode("No header received !!!! "));
}
if (responses.indexOf('\r\n') == -1) {
document.body.appendChild(document.createTextNode("FAILED"));
} else {
document.body.appendChild(document.createTextNode("PASS"));
}
}
}
xhr.open("GET", "testPage.html", true);
xhr.send(null);
</script>
</body>
</html>