Bug 803038 Can't view source of script error if it has attachment disposition r=bz,biesi

This commit is contained in:
Neil Rashbrook 2012-10-20 00:40:36 +01:00
Родитель 2e0327bdb4
Коммит 68164328ad
1 изменённых файлов: 7 добавлений и 15 удалений

Просмотреть файл

@ -339,44 +339,36 @@ nsViewSourceChannel::SetContentCharset(const nsACString &aContentCharset)
return mChannel->SetContentCharset(aContentCharset); return mChannel->SetContentCharset(aContentCharset);
} }
// We don't forward these methods becacuse content-disposition isn't whitelisted
// (see GetResponseHeader/VisitResponseHeaders).
NS_IMETHODIMP NS_IMETHODIMP
nsViewSourceChannel::GetContentDisposition(uint32_t *aContentDisposition) nsViewSourceChannel::GetContentDisposition(uint32_t *aContentDisposition)
{ {
NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE); return NS_ERROR_NOT_AVAILABLE;
return mChannel->GetContentDisposition(aContentDisposition);
} }
NS_IMETHODIMP NS_IMETHODIMP
nsViewSourceChannel::SetContentDisposition(uint32_t aContentDisposition) nsViewSourceChannel::SetContentDisposition(uint32_t aContentDisposition)
{ {
NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE); return NS_ERROR_NOT_AVAILABLE;
return mChannel->SetContentDisposition(aContentDisposition);
} }
NS_IMETHODIMP NS_IMETHODIMP
nsViewSourceChannel::GetContentDispositionFilename(nsAString &aContentDispositionFilename) nsViewSourceChannel::GetContentDispositionFilename(nsAString &aContentDispositionFilename)
{ {
NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE); return NS_ERROR_NOT_AVAILABLE;
return mChannel->GetContentDispositionFilename(aContentDispositionFilename);
} }
NS_IMETHODIMP NS_IMETHODIMP
nsViewSourceChannel::SetContentDispositionFilename(const nsAString &aContentDispositionFilename) nsViewSourceChannel::SetContentDispositionFilename(const nsAString &aContentDispositionFilename)
{ {
NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE); return NS_ERROR_NOT_AVAILABLE;
return mChannel->SetContentDispositionFilename(aContentDispositionFilename);
} }
NS_IMETHODIMP NS_IMETHODIMP
nsViewSourceChannel::GetContentDispositionHeader(nsACString &aContentDispositionHeader) nsViewSourceChannel::GetContentDispositionHeader(nsACString &aContentDispositionHeader)
{ {
NS_ENSURE_TRUE(mChannel, NS_ERROR_FAILURE); return NS_ERROR_NOT_AVAILABLE;
return mChannel->GetContentDispositionHeader(aContentDispositionHeader);
} }
NS_IMETHODIMP NS_IMETHODIMP