diff --git a/netwerk/protocol/viewsource/nsViewSourceChannel.cpp b/netwerk/protocol/viewsource/nsViewSourceChannel.cpp index 8fd3f6c04cc6..49406ef8799b 100644 --- a/netwerk/protocol/viewsource/nsViewSourceChannel.cpp +++ b/netwerk/protocol/viewsource/nsViewSourceChannel.cpp @@ -339,44 +339,36 @@ nsViewSourceChannel::SetContentCharset(const nsACString &aContentCharset) return mChannel->SetContentCharset(aContentCharset); } +// We don't forward these methods becacuse content-disposition isn't whitelisted +// (see GetResponseHeader/VisitResponseHeaders). NS_IMETHODIMP nsViewSourceChannel::GetContentDisposition(uint32_t *aContentDisposition) { - NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE); - - return mChannel->GetContentDisposition(aContentDisposition); + return NS_ERROR_NOT_AVAILABLE; } NS_IMETHODIMP nsViewSourceChannel::SetContentDisposition(uint32_t aContentDisposition) { - NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE); - - return mChannel->SetContentDisposition(aContentDisposition); + return NS_ERROR_NOT_AVAILABLE; } NS_IMETHODIMP nsViewSourceChannel::GetContentDispositionFilename(nsAString &aContentDispositionFilename) { - NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE); - - return mChannel->GetContentDispositionFilename(aContentDispositionFilename); + return NS_ERROR_NOT_AVAILABLE; } NS_IMETHODIMP nsViewSourceChannel::SetContentDispositionFilename(const nsAString &aContentDispositionFilename) { - NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE); - - return mChannel->SetContentDispositionFilename(aContentDispositionFilename); + return NS_ERROR_NOT_AVAILABLE; } NS_IMETHODIMP nsViewSourceChannel::GetContentDispositionHeader(nsACString &aContentDispositionHeader) { - NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE); - - return mChannel->GetContentDispositionHeader(aContentDispositionHeader); + return NS_ERROR_NOT_AVAILABLE; } NS_IMETHODIMP