diff --git a/netwerk/protocol/about/src/nsAboutCache.cpp b/netwerk/protocol/about/src/nsAboutCache.cpp index 45f076ba27fb..80d083abeff9 100644 --- a/netwerk/protocol/about/src/nsAboutCache.cpp +++ b/netwerk/protocol/about/src/nsAboutCache.cpp @@ -130,13 +130,16 @@ nsAboutCache::NewChannel(nsIURI *aURI, nsIChannel **result) mStream = outputStream; rv = cacheService->VisitEntries(this); - if (NS_FAILED(rv)) return rv; + mBuffer.Truncate(); + if (rv == NS_ERROR_NOT_AVAILABLE) { + mBuffer.AppendLiteral("

The cache is disabled.

\n"); + } + else if (NS_FAILED(rv)) { + return rv; + } if (!mDeviceID.IsEmpty()) { - mBuffer.AssignLiteral("\n"); - } - else { - mBuffer.Truncate(); + mBuffer.AppendLiteral("\n"); } mBuffer.AppendLiteral("\n\n\n"); outputStream->Write(mBuffer.get(), mBuffer.Length(), &bytesWritten);