mirror of
https://github.com/nginx/nginx.git
synced 2024-12-24 08:00:14 -06:00
fix building without PCRE, the bug had been introduced in r3326
This commit is contained in:
parent
0bd426def1
commit
6956db0696
@ -1666,6 +1666,8 @@ ngx_http_variable_pid(ngx_http_request_t *r,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if (NGX_PCRE)
|
||||||
|
|
||||||
static ngx_int_t
|
static ngx_int_t
|
||||||
ngx_http_variable_not_found(ngx_http_request_t *r, ngx_http_variable_value_t *v,
|
ngx_http_variable_not_found(ngx_http_request_t *r, ngx_http_variable_value_t *v,
|
||||||
uintptr_t data)
|
uintptr_t data)
|
||||||
@ -1816,6 +1818,8 @@ ngx_http_regex_exec(ngx_http_request_t *r, ngx_http_regex_t *re, ngx_str_t *s)
|
|||||||
return NGX_OK;
|
return NGX_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
ngx_int_t
|
ngx_int_t
|
||||||
ngx_http_variables_add_core_vars(ngx_conf_t *cf)
|
ngx_http_variables_add_core_vars(ngx_conf_t *cf)
|
||||||
|
@ -41,21 +41,6 @@ struct ngx_http_variable_s {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
ngx_uint_t capture;
|
|
||||||
ngx_int_t index;
|
|
||||||
} ngx_http_regex_variable_t;
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
ngx_regex_t *regex;
|
|
||||||
ngx_uint_t ncaptures;
|
|
||||||
ngx_http_regex_variable_t *variables;
|
|
||||||
ngx_uint_t nvariables;
|
|
||||||
ngx_str_t name;
|
|
||||||
} ngx_http_regex_t;
|
|
||||||
|
|
||||||
|
|
||||||
ngx_http_variable_t *ngx_http_add_variable(ngx_conf_t *cf, ngx_str_t *name,
|
ngx_http_variable_t *ngx_http_add_variable(ngx_conf_t *cf, ngx_str_t *name,
|
||||||
ngx_uint_t flags);
|
ngx_uint_t flags);
|
||||||
ngx_int_t ngx_http_get_variable_index(ngx_conf_t *cf, ngx_str_t *name);
|
ngx_int_t ngx_http_get_variable_index(ngx_conf_t *cf, ngx_str_t *name);
|
||||||
@ -74,11 +59,30 @@ ngx_int_t ngx_http_variable_unknown_header(ngx_http_variable_value_t *v,
|
|||||||
#define ngx_http_clear_variable(r, index) r->variables0[index].text.data = NULL;
|
#define ngx_http_clear_variable(r, index) r->variables0[index].text.data = NULL;
|
||||||
|
|
||||||
|
|
||||||
|
#if (NGX_PCRE)
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
ngx_uint_t capture;
|
||||||
|
ngx_int_t index;
|
||||||
|
} ngx_http_regex_variable_t;
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
ngx_regex_t *regex;
|
||||||
|
ngx_uint_t ncaptures;
|
||||||
|
ngx_http_regex_variable_t *variables;
|
||||||
|
ngx_uint_t nvariables;
|
||||||
|
ngx_str_t name;
|
||||||
|
} ngx_http_regex_t;
|
||||||
|
|
||||||
|
|
||||||
ngx_http_regex_t *ngx_http_regex_compile(ngx_conf_t *cf,
|
ngx_http_regex_t *ngx_http_regex_compile(ngx_conf_t *cf,
|
||||||
ngx_regex_compile_t *rc);
|
ngx_regex_compile_t *rc);
|
||||||
ngx_int_t ngx_http_regex_exec(ngx_http_request_t *r, ngx_http_regex_t *re,
|
ngx_int_t ngx_http_regex_exec(ngx_http_request_t *r, ngx_http_regex_t *re,
|
||||||
ngx_str_t *s);
|
ngx_str_t *s);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
ngx_int_t ngx_http_variables_add_core_vars(ngx_conf_t *cf);
|
ngx_int_t ngx_http_variables_add_core_vars(ngx_conf_t *cf);
|
||||||
ngx_int_t ngx_http_variables_init_vars(ngx_conf_t *cf);
|
ngx_int_t ngx_http_variables_init_vars(ngx_conf_t *cf);
|
||||||
|
Loading…
Reference in New Issue
Block a user