зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1339153
- Part 1: Correctly emulate missing headers in nsViewSourceChannel::GetResponseHeader, r=bz
MozReview-Commit-ID: 34bCA7wKkmh
This commit is contained in:
Родитель
570037515c
Коммит
a71fd85f7d
|
@ -907,7 +907,11 @@ nsViewSourceChannel::GetResponseHeader(const nsACString & aHeader,
|
|||
nsCaseInsensitiveCStringComparator()) &&
|
||||
!aHeader.Equals(NS_LITERAL_CSTRING("X-Frame-Options"),
|
||||
nsCaseInsensitiveCStringComparator())) {
|
||||
return NS_OK;
|
||||
// We simulate the NS_ERROR_NOT_AVAILABLE error which is produced by
|
||||
// GetResponseHeader via nsHttpHeaderArray::GetHeader when the entry is
|
||||
// not present, such that it appears as though no headers except for the
|
||||
// whitelisted ones were set on this channel.
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
|
||||
return mHttpChannel->GetResponseHeader(aHeader, aValue);
|
||||
|
|
Загрузка…
Ссылка в новой задаче