Limit accepted chunk-size to 2^63-1 and be strict about chunk-ext
authorized characters.

Submitted by: Yann Ylavic



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1684513 13f79535-47bb-0310-9956-ffa450edef68
AP_DECLARE(int) ap_map_http_request_error(apr_status_t rv, int status)
{
    switch (rv) {
    case AP_FILTER_ERROR: {
        return AP_FILTER_ERROR;
    }
    case APR_EGENERAL: {
        return HTTP_BAD_REQUEST;
    }
    case APR_ENOSPC: {
        return HTTP_REQUEST_ENTITY_TOO_LARGE;
    }
    case APR_ENOTIMPL: {
        return HTTP_NOT_IMPLEMENTED;
    }
    case APR_ETIMEDOUT: {
        return HTTP_REQUEST_TIME_OUT;
    }
    default: {
        return status;
    }
    }
}

AP_DECLARE(int) ap_map_http_request_error(apr_status_t rv, int status)
{
    switch (rv) {
    case AP_FILTER_ERROR: {
        return AP_FILTER_ERROR;
    }
    case APR_EGENERAL: {
        return HTTP_BAD_REQUEST;
    }
    case APR_ENOSPC: {
        return HTTP_REQUEST_ENTITY_TOO_LARGE;
    }
    case APR_ENOTIMPL: {
        return HTTP_NOT_IMPLEMENTED;
    }
    case APR_ETIMEDOUT: {
        return HTTP_REQUEST_TIME_OUT;
    }
    default: {
        return status;
    }
    }
}
