Fix NetworkService ServerTest.* failures and test name typo (see issue #2622).

Always return ERR_NONE and the response body if a CefURLRequest completes
successfully, including for non-2xx status codes. This matches the behavior of
the old network stack.

To test: ServerTest.* tests pass with NetworkService enabled.
This commit is contained in:
Marshall Greenblatt
2019-05-18 17:42:00 +03:00
parent 9a30f05f80
commit bddf2a311b
3 changed files with 7 additions and 6 deletions

View File

@@ -211,11 +211,10 @@ class CefBrowserURLRequest::Context
}
}
if (request_flags & UR_FLAG_NO_RETRY_ON_5XX) {
// No retries is the default setting, so we don't need to configure that.
// Allow delivery of non-2xx response bodies.
loader_->SetAllowHttpErrorResults(true);
} else {
// Allow delivery of non-2xx response bodies.
loader_->SetAllowHttpErrorResults(true);
if (!(request_flags & UR_FLAG_NO_RETRY_ON_5XX)) {
// Allow 2 retries on 5xx response or network change.
// TODO(network): Consider exposing configuration of max retries and/or
// RETRY_ON_NETWORK_CHANGE as a separate flag.