apr_status_t verify_200()

in flood_round_robin.c [1267:1286]


apr_status_t verify_200(int *verified, profile_t *profile, request_t *req, response_t *resp)
{
    round_robin_profile_t *rp;
    int res;

    rp = (round_robin_profile_t*) profile;

    res = memcmp(resp->rbuf, "HTTP/1.1 2", 10);

    if (!res)
        *verified = FLOOD_VALID;
    else if (memcmp(resp->rbuf + 9, "3", 1) == 0) /* Accept 3xx as okay. */
        *verified = FLOOD_VALID;
    else if (memcmp(resp->rbuf, "HTTP/1.0 2", 10) == 0) /* HTTP/1.0 is ok. */
        *verified = FLOOD_VALID;
    else
        *verified = FLOOD_INVALID;

    return APR_SUCCESS;
}