off_t
ngx_atoof(u_char *line, size_t n)
{
    off_t  value, cutoff, cutlim;
    if (n == 0) {
        return NGX_ERROR;
    }
    cutoff = NGX_MAX_OFF_T_VALUE / 10;
    cutlim = NGX_MAX_OFF_T_VALUE % 10;
    for (value = 0; n--; line++) {
        if (*line < '0' || *line > '9') {
            return NGX_ERROR;
        }
        if (value >= cutoff && (value > cutoff || *line - '0' > cutlim)) {
            return NGX_ERROR;
        }
        value = value * 10 + (*line - '0');
    }
    return value;
}
['static ngx_int_t\nngx_http_upstream_cache_check_range(ngx_http_request_t *r,\n    ngx_http_upstream_t *u)\n{\n    off_t             offset;\n    u_char           *p, *start;\n    ngx_table_elt_t  *h;\n    h = r->headers_in.range;\n    if (h == NULL\n        || !u->cacheable\n        || u->conf->cache_max_range_offset == NGX_MAX_OFF_T_VALUE)\n    {\n        return NGX_OK;\n    }\n    if (u->conf->cache_max_range_offset == 0) {\n        return NGX_DECLINED;\n    }\n    if (h->value.len < 7\n        || ngx_strncasecmp(h->value.data, (u_char *) "bytes=", 6) != 0)\n    {\n        return NGX_OK;\n    }\n    p = h->value.data + 6;\n    while (*p == \' \') { p++; }\n    if (*p == \'-\') {\n        return NGX_DECLINED;\n    }\n    start = p;\n    while (*p >= \'0\' && *p <= \'9\') { p++; }\n    offset = ngx_atoof(start, p - start);\n    if (offset >= u->conf->cache_max_range_offset) {\n        return NGX_DECLINED;\n    }\n    return NGX_OK;\n}', "off_t\nngx_atoof(u_char *line, size_t n)\n{\n    off_t  value, cutoff, cutlim;\n    if (n == 0) {\n        return NGX_ERROR;\n    }\n    cutoff = NGX_MAX_OFF_T_VALUE / 10;\n    cutlim = NGX_MAX_OFF_T_VALUE % 10;\n    for (value = 0; n--; line++) {\n        if (*line < '0' || *line > '9') {\n            return NGX_ERROR;\n        }\n        if (value >= cutoff && (value > cutoff || *line - '0' > cutlim)) {\n            return NGX_ERROR;\n        }\n        value = value * 10 + (*line - '0');\n    }\n    return value;\n}"]