mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 11:55:49 +00:00
Bug 730925 - XHR.getAllResponseHeaders should use CRLF, not LF per spec, r=jst, r=jonas, f=ms2ger
This commit is contained in:
parent
fd23bc31f2
commit
30621de994
@ -1457,7 +1457,7 @@ nsXMLHttpRequest::GetAllResponseHeaders(nsString& aResponseHeaders)
|
||||
aResponseHeaders.AppendLiteral(";charset=");
|
||||
AppendASCIItoUTF16(value, aResponseHeaders);
|
||||
}
|
||||
aResponseHeaders.Append('\n');
|
||||
aResponseHeaders.AppendLiteral("\r\n");
|
||||
}
|
||||
}
|
||||
|
||||
@ -3981,7 +3981,7 @@ nsHeaderVisitor::VisitHeader(const nsACString &header, const nsACString &value)
|
||||
mHeaders.Append(header);
|
||||
mHeaders.Append(": ");
|
||||
mHeaders.Append(value);
|
||||
mHeaders.Append('\n');
|
||||
mHeaders.Append("\r\n");
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ for (i = 0; i < passFiles.length; ++i) {
|
||||
is(xhr.status, passFiles[i][2], "wrong status");
|
||||
is(xhr.getResponseHeader("Content-Type"), passFiles[i][3], "wrong content type");
|
||||
var headers = xhr.getAllResponseHeaders();
|
||||
ok(/(?:^|\n)Content-Type:\s*([^\n]*)\n/i.test(headers) &&
|
||||
ok(/(?:^|\n)Content-Type:\s*([^\r\n]*)\r\n/i.test(headers) &&
|
||||
RegExp.$1 === passFiles[i][3], "wrong response headers");
|
||||
if (xhr.responseXML) {
|
||||
is((new XMLSerializer()).serializeToString(xhr.responseXML.documentElement),
|
||||
|
Loading…
Reference in New Issue
Block a user