mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-15 22:35:43 +00:00
fixes bug 137965 "Document contains no data on disconnect"
r=bbaetz sr=rpotts
This commit is contained in:
parent
879dd8888b
commit
92b5a3ff13
@ -268,9 +268,15 @@ nsHttpTransaction::OnStopTransaction(nsresult status)
|
||||
|
||||
// if the connection was reset before we read any part of the response,
|
||||
// then we must try to restart the transaction.
|
||||
if ((status == NS_ERROR_NET_RESET) && (mContentRead == 0)) {
|
||||
if (status == NS_ERROR_NET_RESET) {
|
||||
// if some data was read, then mask the reset error, so our listener
|
||||
// will treat this as a normal failure. XXX we might want to map
|
||||
// this error to a special error code to indicate that the transfer
|
||||
// was abnormally interrupted.
|
||||
if (mContentRead > 0)
|
||||
status = NS_ERROR_ABORT;
|
||||
// if restarting fails, then we must notify our listener.
|
||||
if (NS_SUCCEEDED(Restart()))
|
||||
else if (NS_SUCCEEDED(Restart()))
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user