int ApacheRequest___parse()

in src/request/apache_request.c [404:429]


int ApacheRequest___parse(ApacheRequest *req)
{
    request_rec *r = req->r;
    const char *ct = apr_table_get(r->headers_in, "Content-type");
    int result;

    if (r->args) {
        split_to_parms(req, r->args);
        req->nargs = ((apr_array_header_t *)req->parms)->nelts;
    }

    if ((r->method_number == M_POST) && ct && strncaseEQ(ct, MULTIPART_ENCTYPE, MULTIPART_ENCTYPE_LENGTH))
    {
        //
        //ap_log_rerror(REQ_INFO, "content-type: `%s'", ct);
        //
        result = ApacheRequest_parse_multipart(req,ct);
    }
    else
    {
        result = ApacheRequest_parse_urlencoded(req);
    }

    req->parsed = 1;
    return result;
}