From 7bff8694dadd0946d83de4636fbadd5aca7dc5ee Mon Sep 17 00:00:00 2001 From: "jonas@sicking.cc" Date: Fri, 2 May 2008 19:16:21 -0700 Subject: [PATCH] Backing out to try to fix orange --- content/base/src/nsXMLHttpRequest.cpp | 9 +-------- content/base/test/test_bug308484.html | 22 +--------------------- 2 files changed, 2 insertions(+), 29 deletions(-) diff --git a/content/base/src/nsXMLHttpRequest.cpp b/content/base/src/nsXMLHttpRequest.cpp index 19d0e0cd1fe9..3eced146e9df 100644 --- a/content/base/src/nsXMLHttpRequest.cpp +++ b/content/base/src/nsXMLHttpRequest.cpp @@ -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. diff --git a/content/base/test/test_bug308484.html b/content/base/test/test_bug308484.html index 0941f5949243..56a9c487e0e0 100644 --- a/content/base/test/test_bug308484.html +++ b/content/base/test/test_bug308484.html @@ -20,27 +20,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=308484 /** Test for Bug 308484 **/ -var headers = [ - "aCCept-chaRset", - "acCePt-eNcoDing", - "coNnEctIon", - "coNtEnt-LEngth", - "cOntEnt-tRAnsFer-enCoDiNg", - "DATE", - "exPeCt", - "hOSt", - "keep-alive", - "reFERer", - "te", - "trAiLer", - "trANsfEr-eNcoDiNg", - "uPGraDe", - "viA", - "pRoxy-", - "sEc-", - "proxy-fOobar", - "sec-bAZbOx" -]; +var headers = ["Host", "Content-Length", "Transfer-Encoding", "Via", "Upgrade"]; var i, request; // Try setting headers in unprivileged context