Fix to prevent ODA from firing if there is no data. b71498, r=valeski@netscape.com, sr=darin@netscape.com

This commit is contained in:
dougt%netscape.com 2001-03-26 23:32:19 +00:00
parent 5f5b489750
commit 3d34591986

View File

@ -358,7 +358,7 @@ nsresult nsUnknownDecoder::FireListenerNotifications(nsIRequest* request,
if (NS_SUCCEEDED(rv)) {
rv = out->Write(mBuffer, mBufferLen, &len);
if (NS_SUCCEEDED(rv)) {
if (len == mBufferLen) {
if (len && len == mBufferLen) {
rv = mNextListener->OnDataAvailable(request, aCtxt, in, 0, len);
} else {
NS_ASSERTION(0, "Unable to write all the data into the pipe.");