From 36740b6e82e46ae05bb0e26592cc2f13e118475a Mon Sep 17 00:00:00 2001 From: "rpotts%netscape.com" Date: Wed, 31 Oct 2001 23:15:57 +0000 Subject: [PATCH] bug #102737 (r=harishd@netscape.com, sr=jst@netscape.com) do not emit ... for empty text/plain documents. git-svn-id: svn://10.0.0.236/trunk@106857 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/htmlparser/src/nsParser.cpp | 4 +++- mozilla/parser/htmlparser/src/nsParser.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/mozilla/htmlparser/src/nsParser.cpp b/mozilla/htmlparser/src/nsParser.cpp index dee54a0a21e..0b81d8a6a67 100644 --- a/mozilla/htmlparser/src/nsParser.cpp +++ b/mozilla/htmlparser/src/nsParser.cpp @@ -2503,7 +2503,9 @@ nsresult nsParser::OnStopRequest(nsIRequest *request, nsISupports* aContext, nsresult result=NS_OK; - if(eOnStart==mParserContext->mStreamListenerState) { + if((eOnStart==mParserContext->mStreamListenerState) && + (!mParserContext->mMimeType.EqualsWithConversion(kPlainTextContentType))) + { //If you're here, then OnDataAvailable() never got called. //Prior to necko, we never dealt with this case, but the problem may have existed. diff --git a/mozilla/parser/htmlparser/src/nsParser.cpp b/mozilla/parser/htmlparser/src/nsParser.cpp index dee54a0a21e..0b81d8a6a67 100644 --- a/mozilla/parser/htmlparser/src/nsParser.cpp +++ b/mozilla/parser/htmlparser/src/nsParser.cpp @@ -2503,7 +2503,9 @@ nsresult nsParser::OnStopRequest(nsIRequest *request, nsISupports* aContext, nsresult result=NS_OK; - if(eOnStart==mParserContext->mStreamListenerState) { + if((eOnStart==mParserContext->mStreamListenerState) && + (!mParserContext->mMimeType.EqualsWithConversion(kPlainTextContentType))) + { //If you're here, then OnDataAvailable() never got called. //Prior to necko, we never dealt with this case, but the problem may have existed.