mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
fix(Network): response.ok should be true for file:// urls (#2152)
This commit is contained in:
committed by
Andrey Lushnikov
parent
cad71d9bd9
commit
826fe42c48
@@ -537,7 +537,7 @@ class Response {
|
||||
* @return {boolean}
|
||||
*/
|
||||
ok() {
|
||||
return this._status >= 200 && this._status <= 299;
|
||||
return this._status === 0 || (this._status >= 200 && this._status <= 299);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -772,4 +772,4 @@ const statusTexts = {
|
||||
'511': 'Network Authentication Required',
|
||||
};
|
||||
|
||||
module.exports = NetworkManager;
|
||||
module.exports = {Request, Response, NetworkManager};
|
||||
|
||||
Reference in New Issue
Block a user