src/http/ngx_http_request.c:708: error: Integer Overflow L2
  ([0, +oo] - 1):unsigned64 by call to `ngx_http_read_request_header`.

src/http/ngx_http_request.c:715:14: Unknown value from: ngx_http_parse_request_line
713.         }
714. 
715.         rc = ngx_http_parse_request_line(r, r->header_in);
                  ^
716. 
717.         if (rc == NGX_OK) {

src/http/ngx_http_request.c:708:17: Call
706. 
707.         if (rc == NGX_AGAIN) {
708.             n = ngx_http_read_request_header(r);
                     ^
709. 
710.             if (n == NGX_AGAIN || n == NGX_ERROR) {

src/http/ngx_http_request.c:1108:1: Parameter `r->uri.len`
  1106. 
  1107. 
  1108. static ssize_t
        ^
  1109. ngx_http_read_request_header(ngx_http_request_t *r)
  1110. {

src/http/ngx_http_request.c:1155:9: Call
  1153.         c->log->action = "reading client request headers";
  1154. 
  1155.         ngx_http_finalize_request(r, NGX_HTTP_BAD_REQUEST);
                ^
  1156.         return NGX_ERROR;
  1157.     }

src/http/ngx_http_request.c:1856:1: Parameter `r->uri.len`
    1854. 
    1855. 
    1856. void
          ^
    1857. ngx_http_finalize_request(ngx_http_request_t *r, ngx_int_t rc)
    1858. {

src/http/ngx_http_request.c:1929:38: Call
    1927.         c->write->handler = ngx_http_request_handler;
    1928. 
    1929.         ngx_http_finalize_request(r, ngx_http_special_response_handler(r, rc));
                                               ^
    1930.         return;
    1931.     }

src/http/ngx_http_special_response.c:341:1: Parameter `r->uri.len`
      339. 
      340. 
      341. ngx_int_t
           ^
      342. ngx_http_special_response_handler(ngx_http_request_t *r, ngx_int_t error)
      343. {

src/http/ngx_http_special_response.c:391:24: Call
      389.         for (i = 0; i < clcf->error_pages->nelts; i++) {
      390.             if (err_page[i].status == error) {
      391.                 return ngx_http_send_error_page(r, &err_page[i]);
                                  ^
      392.             }
      393.         }

src/http/ngx_http_special_response.c:512:1: Parameter `r->uri.len`
        510. 
        511. 
        512. static ngx_int_t
             ^
        513. ngx_http_send_error_page(ngx_http_request_t *r, ngx_http_err_page_t *err_page)
        514. {

src/http/ngx_http_special_response.c:546:16: Call
        544.         }
        545. 
        546.         return ngx_http_internal_redirect(r, &uri, &args);
                            ^
        547.     }
        548. 

src/http/ngx_http_core_module.c:2275:1: Parameter `r->uri.len`
          2273. 
          2274. 
          2275. ngx_int_t
                ^
          2276. ngx_http_internal_redirect(ngx_http_request_t *r,
          2277.     ngx_str_t *uri, ngx_str_t *args)

src/http/ngx_http_core_module.c:2305:5: Call
          2303.                    "internal redirect: \"%V?%V\"", uri, &r->args);
          2304. 
          2305.     ngx_http_set_exten(r);
                    ^
          2306. 
          2307.     /* clear the modules contexts */

src/http/ngx_http_core_module.c:1715:1: <LHS trace>
1713. 
1714. 
1715. void
      ^
1716. ngx_http_set_exten(ngx_http_request_t *r)
1717. {

src/http/ngx_http_core_module.c:1715:1: Parameter `r->uri.len`
            1713. 
            1714. 
            1715. void
                  ^
            1716. ngx_http_set_exten(ngx_http_request_t *r)
            1717. {

src/http/ngx_http_core_module.c:1722:10: Binary operation: ([0, +oo] - 1):unsigned64 by call to `ngx_http_read_request_header` 
            1720.     ngx_str_null(&r->exten);
            1721. 
            1722.     for (i = r->uri.len - 1; i > 1; i--) {
                           ^
            1723.         if (r->uri.data[i] == '.' && r->uri.data[i - 1] != '/') {
            1724. 

void
ngx_http_set_exten(ngx_http_request_t *r)
{
    ngx_int_t  i;
    ngx_str_null(&r->exten);
    for (i = r->uri.len - 1; i > 1; i--) {
        if (r->uri.data[i] == '.' && r->uri.data[i - 1] != '/') {
            r->exten.len = r->uri.len - i - 1;
            r->exten.data = &r->uri.data[i + 1];
            return;
        } else if (r->uri.data[i] == '/') {
            return;
        }
    }
    return;
}
['static void\nngx_http_process_request_line(ngx_event_t *rev)\n{\n    u_char                    *host;\n    ssize_t                    n;\n    ngx_int_t                  rc, rv;\n    ngx_connection_t          *c;\n    ngx_http_request_t        *r;\n    ngx_http_core_srv_conf_t  *cscf;\n    c = rev->data;\n    r = c->data;\n    ngx_log_debug0(NGX_LOG_DEBUG_HTTP, rev->log, 0,\n                   "http process request line");\n    if (rev->timedout) {\n        ngx_log_error(NGX_LOG_INFO, c->log, NGX_ETIMEDOUT, "client timed out");\n        c->timedout = 1;\n        ngx_http_close_request(r, NGX_HTTP_REQUEST_TIME_OUT);\n        return;\n    }\n    rc = NGX_AGAIN;\n    for ( ;; ) {\n        if (rc == NGX_AGAIN) {\n            n = ngx_http_read_request_header(r);\n            if (n == NGX_AGAIN || n == NGX_ERROR) {\n                return;\n            }\n        }\n        rc = ngx_http_parse_request_line(r, r->header_in);\n        if (rc == NGX_OK) {\n            r->request_line.len = r->request_end - r->request_start;\n            r->request_line.data = r->request_start;\n            if (r->args_start) {\n                r->uri.len = r->args_start - 1 - r->uri_start;\n            } else {\n                r->uri.len = r->uri_end - r->uri_start;\n            }\n            if (r->complex_uri || r->quoted_uri) {\n                r->uri.data = ngx_pnalloc(r->pool, r->uri.len + 1);\n                if (r->uri.data == NULL) {\n                    ngx_http_close_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);\n                    return;\n                }\n                cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module);\n                rc = ngx_http_parse_complex_uri(r, cscf->merge_slashes);\n                if (rc == NGX_HTTP_PARSE_INVALID_REQUEST) {\n                    ngx_log_error(NGX_LOG_INFO, c->log, 0,\n                                  "client sent invalid request");\n                    ngx_http_finalize_request(r, NGX_HTTP_BAD_REQUEST);\n                    return;\n                }\n            } else {\n                r->uri.data = r->uri_start;\n            }\n            r->unparsed_uri.len = r->uri_end - r->uri_start;\n            r->unparsed_uri.data = r->uri_start;\n            r->valid_unparsed_uri = r->space_in_uri ? 0 : 1;\n            r->method_name.len = r->method_end - r->request_start + 1;\n            r->method_name.data = r->request_line.data;\n            if (r->http_protocol.data) {\n                r->http_protocol.len = r->request_end - r->http_protocol.data;\n            }\n            if (r->uri_ext) {\n                if (r->args_start) {\n                    r->exten.len = r->args_start - 1 - r->uri_ext;\n                } else {\n                    r->exten.len = r->uri_end - r->uri_ext;\n                }\n                r->exten.data = r->uri_ext;\n            }\n            if (r->args_start && r->uri_end > r->args_start) {\n                r->args.len = r->uri_end - r->args_start;\n                r->args.data = r->args_start;\n            }\n#if (NGX_WIN32)\n            {\n            u_char  *p;\n            p = r->uri.data + r->uri.len - 1;\n            while (p > r->uri.data) {\n                if (*p == \' \') {\n                    p--;\n                    continue;\n                }\n                if (*p == \'.\') {\n                    p--;\n                    continue;\n                }\n                if (ngx_strncasecmp(p - 6, (u_char *) "::$data", 7) == 0) {\n                    p -= 7;\n                    continue;\n                }\n                break;\n            }\n            if (p != r->uri.data + r->uri.len - 1) {\n                r->uri.len = p + 1 - r->uri.data;\n                ngx_http_set_exten(r);\n            }\n            }\n#endif\n            ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0,\n                           "http request line: \\"%V\\"", &r->request_line);\n            ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0,\n                           "http uri: \\"%V\\"", &r->uri);\n            ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0,\n                           "http args: \\"%V\\"", &r->args);\n            ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0,\n                           "http exten: \\"%V\\"", &r->exten);\n            if (r->host_start && r->host_end) {\n                host = r->host_start;\n                n = ngx_http_validate_host(r, &host,\n                                           r->host_end - r->host_start, 0);\n                if (n == 0) {\n                    ngx_log_error(NGX_LOG_INFO, c->log, 0,\n                                  "client sent invalid host in request line");\n                    ngx_http_finalize_request(r, NGX_HTTP_BAD_REQUEST);\n                    return;\n                }\n                if (n < 0) {\n                    ngx_http_close_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);\n                    return;\n                }\n                r->headers_in.server.len = n;\n                r->headers_in.server.data = host;\n            }\n            if (r->http_version < NGX_HTTP_VERSION_10) {\n                if (ngx_http_find_virtual_server(r, r->headers_in.server.data,\n                                                 r->headers_in.server.len)\n                    == NGX_ERROR)\n                {\n                    ngx_http_close_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);\n                    return;\n                }\n                ngx_http_process_request(r);\n                return;\n            }\n            if (ngx_list_init(&r->headers_in.headers, r->pool, 20,\n                              sizeof(ngx_table_elt_t))\n                != NGX_OK)\n            {\n                ngx_http_close_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);\n                return;\n            }\n            if (ngx_array_init(&r->headers_in.cookies, r->pool, 2,\n                               sizeof(ngx_table_elt_t *))\n                != NGX_OK)\n            {\n                ngx_http_close_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);\n                return;\n            }\n            c->log->action = "reading client request headers";\n            rev->handler = ngx_http_process_request_headers;\n            ngx_http_process_request_headers(rev);\n            return;\n        }\n        if (rc != NGX_AGAIN) {\n            ngx_log_error(NGX_LOG_INFO, c->log, 0,\n                          ngx_http_client_errors[rc - NGX_HTTP_CLIENT_ERROR]);\n            ngx_http_finalize_request(r, NGX_HTTP_BAD_REQUEST);\n            return;\n        }\n        if (r->header_in->pos == r->header_in->end) {\n            rv = ngx_http_alloc_large_header_buffer(r, 1);\n            if (rv == NGX_ERROR) {\n                ngx_http_close_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);\n                return;\n            }\n            if (rv == NGX_DECLINED) {\n                r->request_line.len = r->header_in->end - r->request_start;\n                r->request_line.data = r->request_start;\n                ngx_log_error(NGX_LOG_INFO, c->log, 0,\n                              "client sent too long URI");\n                ngx_http_finalize_request(r, NGX_HTTP_REQUEST_URI_TOO_LARGE);\n                return;\n            }\n        }\n    }\n}', 'static ssize_t\nngx_http_read_request_header(ngx_http_request_t *r)\n{\n    ssize_t                    n;\n    ngx_event_t               *rev;\n    ngx_connection_t          *c;\n    ngx_http_core_srv_conf_t  *cscf;\n    c = r->connection;\n    rev = c->read;\n    n = r->header_in->last - r->header_in->pos;\n    if (n > 0) {\n        return n;\n    }\n    if (rev->ready) {\n        n = c->recv(c, r->header_in->last,\n                    r->header_in->end - r->header_in->last);\n    } else {\n        n = NGX_AGAIN;\n    }\n    if (n == NGX_AGAIN) {\n        if (!rev->timer_set) {\n            cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module);\n            ngx_add_timer(rev, cscf->client_header_timeout);\n        }\n        if (ngx_handle_read_event(rev, 0) != NGX_OK) {\n            ngx_http_close_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);\n            return NGX_ERROR;\n        }\n        return NGX_AGAIN;\n    }\n    if (n == 0) {\n        ngx_log_error(NGX_LOG_INFO, c->log, 0,\n                      "client closed prematurely connection");\n    }\n    if (n == 0 || n == NGX_ERROR) {\n        c->error = 1;\n        c->log->action = "reading client request headers";\n        ngx_http_finalize_request(r, NGX_HTTP_BAD_REQUEST);\n        return NGX_ERROR;\n    }\n    r->header_in->last += n;\n    return n;\n}', 'void\nngx_http_finalize_request(ngx_http_request_t *r, ngx_int_t rc)\n{\n    ngx_connection_t          *c;\n    ngx_http_request_t        *pr;\n    ngx_http_core_loc_conf_t  *clcf;\n    c = r->connection;\n    ngx_log_debug5(NGX_LOG_DEBUG_HTTP, c->log, 0,\n                   "http finalize request: %d, \\"%V?%V\\" a:%d, c:%d",\n                   rc, &r->uri, &r->args, r == c->data, r->main->count);\n    if (rc == NGX_DONE) {\n        ngx_http_finalize_connection(r);\n        return;\n    }\n    if (rc == NGX_OK && r->filter_finalize) {\n        c->error = 1;\n        return;\n    }\n    if (rc == NGX_DECLINED) {\n        r->content_handler = NULL;\n        r->write_event_handler = ngx_http_core_run_phases;\n        ngx_http_core_run_phases(r);\n        return;\n    }\n    if (r != r->main && r->post_subrequest) {\n        rc = r->post_subrequest->handler(r, r->post_subrequest->data, rc);\n    }\n    if (rc == NGX_ERROR\n        || rc == NGX_HTTP_REQUEST_TIME_OUT\n        || rc == NGX_HTTP_CLIENT_CLOSED_REQUEST\n        || c->error)\n    {\n        if (ngx_http_post_action(r) == NGX_OK) {\n            return;\n        }\n        if (r->main->blocked) {\n            r->write_event_handler = ngx_http_request_finalizer;\n        }\n        ngx_http_terminate_request(r, rc);\n        return;\n    }\n    if (rc >= NGX_HTTP_SPECIAL_RESPONSE\n        || rc == NGX_HTTP_CREATED\n        || rc == NGX_HTTP_NO_CONTENT)\n    {\n        if (rc == NGX_HTTP_CLOSE) {\n            ngx_http_terminate_request(r, rc);\n            return;\n        }\n        if (r == r->main) {\n            if (c->read->timer_set) {\n                ngx_del_timer(c->read);\n            }\n            if (c->write->timer_set) {\n                ngx_del_timer(c->write);\n            }\n        }\n        c->read->handler = ngx_http_request_handler;\n        c->write->handler = ngx_http_request_handler;\n        ngx_http_finalize_request(r, ngx_http_special_response_handler(r, rc));\n        return;\n    }\n    if (r != r->main) {\n        if (r->buffered || r->postponed) {\n            if (ngx_http_set_write_handler(r) != NGX_OK) {\n                ngx_http_terminate_request(r, 0);\n            }\n            return;\n        }\n#if (NGX_DEBUG)\n        if (r != c->data) {\n            ngx_log_debug2(NGX_LOG_DEBUG_HTTP, c->log, 0,\n                           "http finalize non-active request: \\"%V?%V\\"",\n                           &r->uri, &r->args);\n        }\n#endif\n        pr = r->parent;\n        if (r == c->data) {\n            r->main->count--;\n            if (!r->logged) {\n                clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);\n                if (clcf->log_subrequest) {\n                    ngx_http_log_request(r);\n                }\n                r->logged = 1;\n            } else {\n                ngx_log_error(NGX_LOG_ALERT, c->log, 0,\n                              "subrequest: \\"%V?%V\\" logged again",\n                              &r->uri, &r->args);\n            }\n            r->done = 1;\n            if (pr->postponed && pr->postponed->request == r) {\n                pr->postponed = pr->postponed->next;\n            }\n            c->data = pr;\n        } else {\n            r->write_event_handler = ngx_http_request_finalizer;\n            if (r->waited) {\n                r->done = 1;\n            }\n        }\n        if (ngx_http_post_request(pr, NULL) != NGX_OK) {\n            r->main->count++;\n            ngx_http_terminate_request(r, 0);\n            return;\n        }\n        ngx_log_debug2(NGX_LOG_DEBUG_HTTP, c->log, 0,\n                       "http wake parent request: \\"%V?%V\\"",\n                       &pr->uri, &pr->args);\n        return;\n    }\n    if (r->buffered || c->buffered || r->postponed || r->blocked) {\n        if (ngx_http_set_write_handler(r) != NGX_OK) {\n            ngx_http_terminate_request(r, 0);\n        }\n        return;\n    }\n    if (r != c->data) {\n        ngx_log_error(NGX_LOG_ALERT, c->log, 0,\n                      "http finalize non-active request: \\"%V?%V\\"",\n                      &r->uri, &r->args);\n        return;\n    }\n    r->done = 1;\n    r->write_event_handler = ngx_http_request_empty_handler;\n    if (!r->post_action) {\n        r->request_complete = 1;\n    }\n    if (ngx_http_post_action(r) == NGX_OK) {\n        return;\n    }\n    if (c->read->timer_set) {\n        ngx_del_timer(c->read);\n    }\n    if (c->write->timer_set) {\n        c->write->delayed = 0;\n        ngx_del_timer(c->write);\n    }\n    if (c->read->eof) {\n        ngx_http_close_request(r, 0);\n        return;\n    }\n    ngx_http_finalize_connection(r);\n}', 'ngx_int_t\nngx_http_special_response_handler(ngx_http_request_t *r, ngx_int_t error)\n{\n    ngx_uint_t                 i, err;\n    ngx_http_err_page_t       *err_page;\n    ngx_http_core_loc_conf_t  *clcf;\n    ngx_log_debug3(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,\n                   "http special response: %d, \\"%V?%V\\"",\n                   error, &r->uri, &r->args);\n    r->err_status = error;\n    if (r->keepalive) {\n        switch (error) {\n            case NGX_HTTP_BAD_REQUEST:\n            case NGX_HTTP_REQUEST_ENTITY_TOO_LARGE:\n            case NGX_HTTP_REQUEST_URI_TOO_LARGE:\n            case NGX_HTTP_TO_HTTPS:\n            case NGX_HTTPS_CERT_ERROR:\n            case NGX_HTTPS_NO_CERT:\n            case NGX_HTTP_INTERNAL_SERVER_ERROR:\n                r->keepalive = 0;\n        }\n    }\n    if (r->lingering_close == 1) {\n        switch (error) {\n            case NGX_HTTP_BAD_REQUEST:\n            case NGX_HTTP_TO_HTTPS:\n            case NGX_HTTPS_CERT_ERROR:\n            case NGX_HTTPS_NO_CERT:\n                r->lingering_close = 0;\n        }\n    }\n    r->headers_out.content_type.len = 0;\n    clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);\n    if (!r->error_page && clcf->error_pages && r->uri_changes != 0) {\n        if (clcf->recursive_error_pages == 0) {\n            r->error_page = 1;\n        }\n        err_page = clcf->error_pages->elts;\n        for (i = 0; i < clcf->error_pages->nelts; i++) {\n            if (err_page[i].status == error) {\n                return ngx_http_send_error_page(r, &err_page[i]);\n            }\n        }\n    }\n    r->expect_tested = 1;\n    if (ngx_http_discard_request_body(r) != NGX_OK) {\n        error = NGX_HTTP_INTERNAL_SERVER_ERROR;\n    }\n    if (clcf->msie_refresh\n        && r->headers_in.msie\n        && (error == NGX_HTTP_MOVED_PERMANENTLY\n            || error == NGX_HTTP_MOVED_TEMPORARILY))\n    {\n        return ngx_http_send_refresh(r);\n    }\n    if (error == NGX_HTTP_CREATED) {\n        err = 0;\n        r->header_only = 1;\n    } else if (error == NGX_HTTP_NO_CONTENT) {\n        err = 0;\n    } else if (error >= NGX_HTTP_MOVED_PERMANENTLY\n               && error < NGX_HTTP_LAST_LEVEL_300)\n    {\n        err = error - NGX_HTTP_MOVED_PERMANENTLY + NGX_HTTP_LEVEL_200;\n    } else if (error >= NGX_HTTP_BAD_REQUEST\n               && error < NGX_HTTP_LAST_LEVEL_400)\n    {\n        err = error - NGX_HTTP_BAD_REQUEST + NGX_HTTP_LEVEL_200\n                                           + NGX_HTTP_LEVEL_300;\n    } else if (error >= NGX_HTTP_OWN_CODES\n               && error < NGX_HTTP_LAST_LEVEL_500)\n    {\n        err = error - NGX_HTTP_OWN_CODES + NGX_HTTP_LEVEL_200\n                                         + NGX_HTTP_LEVEL_300\n                                         + NGX_HTTP_LEVEL_400;\n        switch (error) {\n            case NGX_HTTP_TO_HTTPS:\n            case NGX_HTTPS_CERT_ERROR:\n            case NGX_HTTPS_NO_CERT:\n                r->err_status = NGX_HTTP_BAD_REQUEST;\n                break;\n        }\n    } else {\n        err = 0;\n    }\n    return ngx_http_send_special_response(r, clcf, err);\n}', 'static ngx_int_t\nngx_http_send_error_page(ngx_http_request_t *r, ngx_http_err_page_t *err_page)\n{\n    ngx_int_t                  overwrite;\n    ngx_str_t                  uri, args;\n    ngx_table_elt_t           *location;\n    ngx_http_core_loc_conf_t  *clcf;\n    overwrite = err_page->overwrite;\n    if (overwrite && overwrite != NGX_HTTP_OK) {\n        r->expect_tested = 1;\n    }\n    r->err_status = overwrite;\n    if (ngx_http_complex_value(r, &err_page->value, &uri) != NGX_OK) {\n        return NGX_ERROR;\n    }\n    if (uri.data[0] == \'/\') {\n        if (err_page->value.lengths) {\n            ngx_http_split_args(r, &uri, &args);\n        } else {\n            args = err_page->args;\n        }\n        if (r->method != NGX_HTTP_HEAD) {\n            r->method = NGX_HTTP_GET;\n            r->method_name = ngx_http_get_name;\n        }\n        return ngx_http_internal_redirect(r, &uri, &args);\n    }\n    if (uri.data[0] == \'@\') {\n        return ngx_http_named_location(r, &uri);\n    }\n    location = ngx_list_push(&r->headers_out.headers);\n    if (location == NULL) {\n        return NGX_ERROR;\n    }\n    r->err_status = NGX_HTTP_MOVED_TEMPORARILY;\n    location->hash = 1;\n    ngx_str_set(&location->key, "Location");\n    location->value = uri;\n    r->headers_out.location = location;\n    clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);\n    if (clcf->msie_refresh && r->headers_in.msie) {\n        return ngx_http_send_refresh(r);\n    }\n    return ngx_http_send_special_response(r, clcf, NGX_HTTP_MOVED_TEMPORARILY\n                                                   - NGX_HTTP_MOVED_PERMANENTLY\n                                                   + NGX_HTTP_LEVEL_200);\n}', 'ngx_int_t\nngx_http_internal_redirect(ngx_http_request_t *r,\n    ngx_str_t *uri, ngx_str_t *args)\n{\n    ngx_http_core_srv_conf_t  *cscf;\n    r->uri_changes--;\n    if (r->uri_changes == 0) {\n        ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,\n                      "rewrite or internal redirection cycle "\n                      "while internal redirect to \\"%V\\"", uri);\n        r->main->count++;\n        ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);\n        return NGX_DONE;\n    }\n    r->uri = *uri;\n    if (args) {\n        r->args = *args;\n    } else {\n        ngx_str_null(&r->args);\n    }\n    ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,\n                   "internal redirect: \\"%V?%V\\"", uri, &r->args);\n    ngx_http_set_exten(r);\n    ngx_memzero(r->ctx, sizeof(void *) * ngx_http_max_module);\n    cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module);\n    r->loc_conf = cscf->ctx->loc_conf;\n    ngx_http_update_location_config(r);\n#if (NGX_HTTP_CACHE)\n    r->cache = NULL;\n#endif\n    r->internal = 1;\n    r->add_uri_to_alias = 0;\n    r->main->count++;\n    ngx_http_handler(r);\n    return NGX_DONE;\n}', "void\nngx_http_set_exten(ngx_http_request_t *r)\n{\n    ngx_int_t  i;\n    ngx_str_null(&r->exten);\n    for (i = r->uri.len - 1; i > 1; i--) {\n        if (r->uri.data[i] == '.' && r->uri.data[i - 1] != '/') {\n            r->exten.len = r->uri.len - i - 1;\n            r->exten.data = &r->uri.data[i + 1];\n            return;\n        } else if (r->uri.data[i] == '/') {\n            return;\n        }\n    }\n    return;\n}"]