rc = ngx_http_core_find_location(r);
- if (rc == NGX_HTTP_INTERNAL_SERVER_ERROR) {
+ if (rc == NGX_ERROR) {
ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
return NGX_OK;
}
}
+/*
+ * NGX_OK - exact or regex match
+ * NGX_DONE - auto redirect
+ * NGX_AGAIN - inclusive match
+ * NGX_ERROR - regex error
+ * NGX_DECLINED - no match
+ */
+
static ngx_int_t
ngx_http_core_find_location(ngx_http_request_t *r)
{
ngx_regex_exec_n
" failed: %d on \"%V\" using \"%V\"",
n, &r->uri, &(*clcfp)->name);
- return NGX_HTTP_INTERNAL_SERVER_ERROR;
+ return NGX_ERROR;
}
/* match */
/* look up nested locations */
- return ngx_http_core_find_location(r);
+ rc = ngx_http_core_find_location(r);
+
+ return (rc == NGX_ERROR) ? rc : NGX_OK;
}
}
#endif