Backing out to try to fix orange
git-svn-id: svn://10.0.0.236/trunk@251123 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1998,7 +1998,7 @@ nsXMLHttpRequest::SetRequestHeader(const nsACString& header,
|
||||
const char *kInvalidHeaders[] = {
|
||||
"accept-charset", "accept-encoding", "connection", "content-length",
|
||||
"content-transfer-encoding", "date", "expect", "host", "keep-alive",
|
||||
"referer", "access-control-origin", "te", "trailer",
|
||||
"proxy-connection", "referer", "access-control-origin", "te", "trailer",
|
||||
"transfer-encoding", "upgrade", "via", "xmlhttprequest-security-check"
|
||||
};
|
||||
PRUint32 i;
|
||||
@@ -2008,13 +2008,6 @@ nsXMLHttpRequest::SetRequestHeader(const nsACString& header,
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
if (StringBeginsWith(header, NS_LITERAL_CSTRING("proxy-"),
|
||||
nsCaseInsensitiveCStringComparator()) ||
|
||||
StringBeginsWith(header, NS_LITERAL_CSTRING("sec-"),
|
||||
nsCaseInsensitiveCStringComparator())) {
|
||||
NS_WARNING("refusing to set request header");
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
||||
// We need to set, not add to, the header.
|
||||
|
||||
Reference in New Issue
Block a user