Mercurial > hg > nginx-vendor-current
comparison src/core/ngx_regex.c @ 676:bfa81a0490a2 NGINX_1_3_1
nginx 1.3.1
*) Security: now nginx/Windows ignores trailing dot in URI path
component, and does not allow URIs with ":$" in it.
Thanks to Vladimir Kochetkov, Positive Research Center.
*) Feature: the "proxy_pass", "fastcgi_pass", "scgi_pass", "uwsgi_pass"
directives, and the "server" directive inside the "upstream" block,
now support IPv6 addresses.
*) Feature: the "resolver" directive now support IPv6 addresses and an
optional port specification.
*) Feature: the "least_conn" directive inside the "upstream" block.
*) Feature: it is now possible to specify a weight for servers while
using the "ip_hash" directive.
*) Bugfix: a segmentation fault might occur in a worker process if the
"image_filter" directive was used; the bug had appeared in 1.3.0.
*) Bugfix: nginx could not be built with ngx_cpp_test_module; the bug
had appeared in 1.1.12.
*) Bugfix: access to variables from SSI and embedded perl module might
not work after reconfiguration.
Thanks to Yichun Zhang.
*) Bugfix: in the ngx_http_xslt_filter_module.
Thanks to Kuramoto Eiji.
*) Bugfix: memory leak if $geoip_org variable was used.
Thanks to Denis F. Latypoff.
*) Bugfix: in the "proxy_cookie_domain" and "proxy_cookie_path"
directives.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Tue, 05 Jun 2012 00:00:00 +0400 |
parents | d0f7a625f27c |
children |
comparison
equal
deleted
inserted
replaced
675:7052a9379344 | 676:bfa81a0490a2 |
---|---|
150 rc->regex = ngx_pcalloc(rc->pool, sizeof(ngx_regex_t)); | 150 rc->regex = ngx_pcalloc(rc->pool, sizeof(ngx_regex_t)); |
151 if (rc->regex == NULL) { | 151 if (rc->regex == NULL) { |
152 return NGX_ERROR; | 152 return NGX_ERROR; |
153 } | 153 } |
154 | 154 |
155 rc->regex->pcre = re; | 155 rc->regex->code = re; |
156 | 156 |
157 /* do not study at runtime */ | 157 /* do not study at runtime */ |
158 | 158 |
159 if (ngx_pcre_studies != NULL) { | 159 if (ngx_pcre_studies != NULL) { |
160 elt = ngx_list_push(ngx_pcre_studies); | 160 elt = ngx_list_push(ngx_pcre_studies); |
365 part = part->next; | 365 part = part->next; |
366 elts = part->elts; | 366 elts = part->elts; |
367 i = 0; | 367 i = 0; |
368 } | 368 } |
369 | 369 |
370 elts[i].regex->extra = pcre_study(elts[i].regex->pcre, opt, &errstr); | 370 elts[i].regex->extra = pcre_study(elts[i].regex->code, opt, &errstr); |
371 | 371 |
372 if (errstr != NULL) { | 372 if (errstr != NULL) { |
373 ngx_log_error(NGX_LOG_ALERT, cycle->log, 0, | 373 ngx_log_error(NGX_LOG_ALERT, cycle->log, 0, |
374 "pcre_study() failed: %s in \"%s\"", | 374 "pcre_study() failed: %s in \"%s\"", |
375 errstr, elts[i].name); | 375 errstr, elts[i].name); |
378 #if (NGX_HAVE_PCRE_JIT) | 378 #if (NGX_HAVE_PCRE_JIT) |
379 if (opt & PCRE_STUDY_JIT_COMPILE) { | 379 if (opt & PCRE_STUDY_JIT_COMPILE) { |
380 int jit, n; | 380 int jit, n; |
381 | 381 |
382 jit = 0; | 382 jit = 0; |
383 n = pcre_fullinfo(elts[i].regex->pcre, elts[i].regex->extra, | 383 n = pcre_fullinfo(elts[i].regex->code, elts[i].regex->extra, |
384 PCRE_INFO_JIT, &jit); | 384 PCRE_INFO_JIT, &jit); |
385 | 385 |
386 if (n != 0 || jit != 1) { | 386 if (n != 0 || jit != 1) { |
387 ngx_log_error(NGX_LOG_INFO, cycle->log, 0, | 387 ngx_log_error(NGX_LOG_INFO, cycle->log, 0, |
388 "JIT compiler does not support pattern: \"%s\"", | 388 "JIT compiler does not support pattern: \"%s\"", |