diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2017-06-16 11:57:08 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-02-02 18:57:14 +0100 |
commit | d795f4c2c2dfee7d6c1f86116e3213c8cd7c109f (patch) | |
tree | 058df8602bc142888cbeb91b2b6518a2af3d842a /dom/base/nsScriptLoader.cpp | |
parent | 7d0c56c2879861e97e0c8af6daa16fa3b945eec4 (diff) | |
download | uxp-d795f4c2c2dfee7d6c1f86116e3213c8cd7c109f.tar.gz |
Support "SourceMap" header along with "X-SourceMap"
Diffstat (limited to 'dom/base/nsScriptLoader.cpp')
-rw-r--r-- | dom/base/nsScriptLoader.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/dom/base/nsScriptLoader.cpp b/dom/base/nsScriptLoader.cpp index 6c732db6ca..a6d20e363c 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); |