summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2017-06-16 11:57:08 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-02-02 18:57:14 +0100
commitd795f4c2c2dfee7d6c1f86116e3213c8cd7c109f (patch)
tree058df8602bc142888cbeb91b2b6518a2af3d842a
parent7d0c56c2879861e97e0c8af6daa16fa3b945eec4 (diff)
downloadUXP-d795f4c2c2dfee7d6c1f86116e3213c8cd7c109f.tar
UXP-d795f4c2c2dfee7d6c1f86116e3213c8cd7c109f.tar.gz
UXP-d795f4c2c2dfee7d6c1f86116e3213c8cd7c109f.tar.lz
UXP-d795f4c2c2dfee7d6c1f86116e3213c8cd7c109f.tar.xz
UXP-d795f4c2c2dfee7d6c1f86116e3213c8cd7c109f.zip
Support "SourceMap" header along with "X-SourceMap"
-rw-r--r--dom/base/nsScriptLoader.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/dom/base/nsScriptLoader.cpp b/dom/base/nsScriptLoader.cpp
index 6c732db6c..a6d20e363 100644
--- a/dom/base/nsScriptLoader.cpp
+++ b/dom/base/nsScriptLoader.cpp
@@ -2630,7 +2630,10 @@ nsScriptLoader::PrepareLoadedRequest(nsScriptLoadRequest* aRequest,
}
nsAutoCString sourceMapURL;
- rv = httpChannel->GetResponseHeader(NS_LITERAL_CSTRING("X-SourceMap"), sourceMapURL);
+ rv = httpChannel->GetResponseHeader(NS_LITERAL_CSTRING("SourceMap"), sourceMapURL);
+ if (NS_FAILED(rv)) {
+ rv = httpChannel->GetResponseHeader(NS_LITERAL_CSTRING("X-SourceMap"), sourceMapURL);
+ }
if (NS_SUCCEEDED(rv)) {
aRequest->mHasSourceMapURL = true;
aRequest->mSourceMapURL = NS_ConvertUTF8toUTF16(sourceMapURL);