Bug 105507; handle pseudo-error in OnStopRequest when target is redirected; r=pchen, sr=hyatt

This commit is contained in:
law%netscape.com 2001-11-05 06:13:26 +00:00
Родитель 276f305018
Коммит 1054d20ae5
1 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -282,7 +282,7 @@ nsStreamXferOp::OnStartRequest(nsIRequest *request, nsISupports* aContext) {
#endif
#ifdef USE_ASYNC_READ
if ( !mOutputStream ) {
if ( !mOutputStream && mOutputTransport ) {
// Open output stream.
rv = mOutputTransport->OpenOutputStream(0,-1,0,getter_AddRefs( mOutputStream ) );
@ -501,6 +501,12 @@ nsStreamXferOp::OnStopRequest( nsIRequest *request,
}
}
}
// A request has been redirected. We ignore this "failure" and pick up with the
// subsequent OnStartRequest for the redirected URL.
if ( aStatus == NS_BINDING_REDIRECTED ) {
return NS_OK;
}
#endif // USE_ASYNC_READ
// If an error occurred, shut down.