| 263 | } |
| 264 | |
| 265 | bool |
| 266 | response_is_retryable(ParentRetry_t retry_type, HTTPStatus response_code) const |
| 267 | { |
| 268 | Dbg(dbg_ctl_parent_select, "In response_is_retryable, code: %d, type: %d", response_code, retry_type); |
| 269 | if (retry_type == PARENT_RETRY_BOTH) { |
| 270 | Dbg(dbg_ctl_parent_select, "Saw retry both"); |
| 271 | return (rec->unavailable_server_retry_responses->contains(response_code) || |
| 272 | rec->simple_server_retry_responses->contains(response_code)); |
| 273 | } else if (retry_type == PARENT_RETRY_UNAVAILABLE_SERVER) { |
| 274 | Dbg(dbg_ctl_parent_select, "Saw retry unavailable server"); |
| 275 | return rec->unavailable_server_retry_responses->contains(response_code); |
| 276 | } else if (retry_type == PARENT_RETRY_SIMPLE) { |
| 277 | Dbg(dbg_ctl_parent_select, "Saw retry simple retry"); |
| 278 | return rec->simple_server_retry_responses->contains(response_code); |
| 279 | } else { |
| 280 | return false; |
| 281 | } |
| 282 | } |
| 283 | |
| 284 | bool |
| 285 | bypass_ok() const |
no test coverage detected