Fix for Bug #8117 --> aborting a connection was causing an error condition to get passed into the

nsDocumentLoader::OnStopBinding. But an abort is not an error condition. the document loader
was incorrectly complaining that we had an error when we really didn't.
This commit is contained in:
mscott%netscape.com 1999-06-14 22:47:15 +00:00
parent cf64697634
commit b6b31b270a

View File

@ -798,7 +798,12 @@ void stub_abort(NET_StreamClass *stream, int status)
if (pConn->pConsumer) {
nsAutoString status;
pConn->pConsumer->OnStopBinding(pConn->pURL, NS_BINDING_ABORTED, status.GetUnicode());
// mscott --> this code used to pass in NS_BINDING_ABORTED into the OnStopBinding
// call. But NS_BINDING_ABORTED is an error code!!! And aborting a stream
// is NOT an error condition. nsDocumentLoader::OnStopBinding was issuing
// printfs complaining that the status code was a failure code.
// I'm going to pass in NS_BINDING_SUCCEEDED instead.
pConn->pConsumer->OnStopBinding(pConn->pURL, NS_BINDING_SUCCEEDED, status.GetUnicode());
pConn->mStatus = nsConnectionAborted;
}