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);
}
// 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