Mercurial > hg > nginx-vendor-0-8
annotate src/core/ngx_regex.h @ 562:7fa8dc2315bd NGINX_0_8_33
nginx 0.8.33
*) Security: now nginx/Windows ignores trailing spaces in URI.
Thanks to Dan Crowley, Core Security Technologies.
*) Security: now nginx/Windows ignores short files names.
Thanks to Dan Crowley, Core Security Technologies.
*) Change: now keepalive connections after POST requests are not
disabled for MSIE 7.0+. Thanks to Adam Lounds.
*) Workaround: now keepalive connections are disabled for Safari.
Thanks to Joshua Sierles.
*) Bugfix: if a proxied or FastCGI request was internally redirected to
another proxied or FastCGI location, then $upstream_response_time
variable may have abnormally large value; the bug had appeared in
0.8.7.
*) Bugfix: a segmentation fault might occur in a worker process, while
discarding a request body; the bug had appeared in 0.8.11.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 01 Feb 2010 00:00:00 +0000 |
parents | e19e5f542878 |
children |
rev | line source |
---|---|
0 | 1 |
2 /* | |
3 * Copyright (C) Igor Sysoev | |
4 */ | |
5 | |
6 | |
7 #ifndef _NGX_REGEX_H_INCLUDED_ | |
8 #define _NGX_REGEX_H_INCLUDED_ | |
9 | |
10 | |
11 #include <ngx_config.h> | |
12 #include <ngx_core.h> | |
13 | |
14 #include <pcre.h> | |
15 | |
16 | |
546 | 17 #define NGX_REGEX_NO_MATCHED PCRE_ERROR_NOMATCH /* -1 */ |
30 | 18 |
19 #define NGX_REGEX_CASELESS PCRE_CASELESS | |
0 | 20 |
21 typedef pcre ngx_regex_t; | |
22 | |
546 | 23 |
358 | 24 typedef struct { |
546 | 25 ngx_str_t pattern; |
26 ngx_pool_t *pool; | |
27 ngx_int_t options; | |
28 | |
29 ngx_regex_t *regex; | |
30 int captures; | |
31 int named_captures; | |
32 int name_size; | |
33 u_char *names; | |
34 ngx_str_t err; | |
35 } ngx_regex_compile_t; | |
36 | |
37 | |
38 typedef struct { | |
39 ngx_regex_t *regex; | |
40 u_char *name; | |
358 | 41 } ngx_regex_elt_t; |
42 | |
43 | |
48 | 44 void ngx_regex_init(void); |
546 | 45 ngx_int_t ngx_regex_compile(ngx_regex_compile_t *rc); |
46 | |
47 #define ngx_regex_exec(re, s, captures, size) \ | |
48 pcre_exec(re, NULL, (const char *) (s)->data, (s)->len, 0, 0, \ | |
49 captures, size) | |
50 #define ngx_regex_exec_n "pcre_exec()" | |
51 | |
358 | 52 ngx_int_t ngx_regex_exec_array(ngx_array_t *a, ngx_str_t *s, ngx_log_t *log); |
53 | |
0 | 54 |
55 #endif /* _NGX_REGEX_H_INCLUDED_ */ |