Mercurial > hg > nginx-vendor-current
annotate src/core/ngx_regex.h @ 558:2da4537168f8 NGINX_0_8_31
nginx 0.8.31
*) Feature: now the "error_page" directive may redirect the 301 and 302
responses.
*) Feature: the $geoip_city_continent_code, $geoip_latitude, and
$geoip_longitude variables.
Thanks to Arvind Sundararajan.
*) Feature: now the ngx_http_image_filter_module deletes always EXIF
and other application specific data if the data consume more than 5%
of a JPEG file.
*) Bugfix: nginx closed a connection if a cached response had an empty
body.
Thanks to Piotr Sikora.
*) Bugfix: nginx might not be built by gcc 4.x if the -O2 or higher
optimization option was used.
Thanks to Maxim Dounin and Denis F. Latypoff.
*) Bugfix: regular expressions in location were always tested in
case-sensitive mode; the bug had appeared in 0.8.25.
*) Bugfix: nginx cached a 304 response if there was the "If-None-Match"
header line in a proxied request.
Thanks to Tim Dettrick and David Kostal.
*) Bugfix: nginx/Windows tried to delete a temporary file twice if the
file should replace an already existent file.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Wed, 23 Dec 2009 00:00:00 +0300 |
parents | e19e5f542878 |
children | 9d21dad0b5a1 |
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_ */ |