mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1011748 - Added logic to GetStatusText to ensure the statusText is available after all redirects (if any) have been followed. r=bz
This commit is contained in:
parent
fa785309a3
commit
141256b4cf
@ -1169,7 +1169,17 @@ nsXMLHttpRequest::GetStatusText(nsCString& aStatusText)
|
||||
return;
|
||||
}
|
||||
|
||||
httpChannel->GetResponseStatusText(aStatusText);
|
||||
|
||||
// Check the current XHR state to see if it is valid to obtain the statusText
|
||||
// value. This check is to prevent the status text for redirects from being
|
||||
// available before all the redirects have been followed and HTTP headers have
|
||||
// been received.
|
||||
uint16_t readyState;
|
||||
GetReadyState(&readyState);
|
||||
if (readyState != OPENED && readyState != UNSENT) {
|
||||
httpChannel->GetResponseStatusText(aStatusText);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user