comparison src/http/modules/ngx_http_ssi_filter_module.c @ 3319:be47fe127f8c

ngx_regex_exec() calling optimiztion: *) change NGX_REGEX_NO_MATCHED to PCRE_ERROR_NOMATCH *) declare ngx_regex_exec() as #define *) optimize SSI regex a little
author Igor Sysoev <igor@sysoev.ru>
date Fri, 13 Nov 2009 20:41:41 +0000
parents d430c6ab1c99
children 42c16d8bddbe
comparison
equal deleted inserted replaced
3318:48402deff89a 3319:be47fe127f8c
2466 return NGX_HTTP_SSI_ERROR; 2466 return NGX_HTTP_SSI_ERROR;
2467 } 2467 }
2468 2468
2469 rc = ngx_regex_exec(regex, &left, NULL, 0); 2469 rc = ngx_regex_exec(regex, &left, NULL, 0);
2470 2470
2471 if (rc != NGX_REGEX_NO_MATCHED && rc < 0) { 2471 if (rc < NGX_REGEX_NO_MATCHED) {
2472 ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0, 2472 ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0,
2473 ngx_regex_exec_n " failed: %d on \"%V\" using \"%V\"", 2473 ngx_regex_exec_n " failed: %d on \"%V\" using \"%V\"",
2474 rc, &left, &right); 2474 rc, &left, &right);
2475 return NGX_HTTP_SSI_ERROR; 2475 return NGX_HTTP_SSI_ERROR;
2476 } 2476 }