Mercurial > hg > nginx-vendor-current
comparison src/http/modules/perl/ngx_http_perl_module.c @ 166:fef68f68bcfd NGINX_0_3_30
nginx 0.3.30
*) Change: the ECONNABORTED error log level was changed to "error" from
"crit".
*) Bugfix: the ngx_http_perl_module could not be build without the
ngx_http_ssi_filter_module.
*) Bugfix: nginx could not be built on i386 platform, if the PIC was
used; bug appeared in 0.3.27.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Wed, 22 Feb 2006 00:00:00 +0300 |
parents | ea622d8acb38 |
children | 3314be145cb9 |
comparison
equal
deleted
inserted
replaced
165:c461f0beadb0 | 166:fef68f68bcfd |
---|---|
32 SV *sub; | 32 SV *sub; |
33 ngx_str_t handler; | 33 ngx_str_t handler; |
34 } ngx_http_perl_variable_t; | 34 } ngx_http_perl_variable_t; |
35 | 35 |
36 | 36 |
37 #if (NGX_HTTP_SSI) | |
37 static ngx_int_t ngx_http_perl_ssi(ngx_http_request_t *r, | 38 static ngx_int_t ngx_http_perl_ssi(ngx_http_request_t *r, |
38 ngx_http_ssi_ctx_t *ssi_ctx, ngx_str_t **params); | 39 ngx_http_ssi_ctx_t *ssi_ctx, ngx_str_t **params); |
40 #endif | |
41 | |
39 static ngx_int_t | 42 static ngx_int_t |
40 ngx_http_perl_get_interpreter(ngx_http_perl_main_conf_t *pmcf, | 43 ngx_http_perl_get_interpreter(ngx_http_perl_main_conf_t *pmcf, |
41 PerlInterpreter **perl, ngx_log_t *log); | 44 PerlInterpreter **perl, ngx_log_t *log); |
42 static ngx_inline void | 45 static ngx_inline void |
43 ngx_http_perl_free_interpreter(ngx_http_perl_main_conf_t *pmcf, | 46 ngx_http_perl_free_interpreter(ngx_http_perl_main_conf_t *pmcf, |
140 NULL, /* exit master */ | 143 NULL, /* exit master */ |
141 NGX_MODULE_V1_PADDING | 144 NGX_MODULE_V1_PADDING |
142 }; | 145 }; |
143 | 146 |
144 | 147 |
148 #if (NGX_HTTP_SSI) | |
149 | |
145 #define NGX_HTTP_PERL_SSI_SUB 0 | 150 #define NGX_HTTP_PERL_SSI_SUB 0 |
146 #define NGX_HTTP_PERL_SSI_ARG 1 | 151 #define NGX_HTTP_PERL_SSI_ARG 1 |
147 | 152 |
148 | 153 |
149 static ngx_http_ssi_param_t ngx_http_perl_ssi_params[] = { | 154 static ngx_http_ssi_param_t ngx_http_perl_ssi_params[] = { |
150 { ngx_string("sub"), NGX_HTTP_PERL_SSI_SUB, 1, 0 }, | 155 { ngx_string("sub"), NGX_HTTP_PERL_SSI_SUB, 1, 0 }, |
151 { ngx_string("arg"), NGX_HTTP_PERL_SSI_ARG, 0, 1 }, | 156 { ngx_string("arg"), NGX_HTTP_PERL_SSI_ARG, 0, 1 }, |
152 { ngx_null_string, 0, 0, 0 } | 157 { ngx_null_string, 0, 0, 0 } |
153 }; | 158 }; |
154 | 159 |
155 | |
156 static ngx_http_ssi_command_t ngx_http_perl_ssi_command = { | 160 static ngx_http_ssi_command_t ngx_http_perl_ssi_command = { |
157 ngx_string("perl"), ngx_http_perl_ssi, ngx_http_perl_ssi_params, 0, 1 | 161 ngx_string("perl"), ngx_http_perl_ssi, ngx_http_perl_ssi_params, 0, 1 |
158 }; | 162 }; |
163 | |
164 #endif | |
159 | 165 |
160 | 166 |
161 static void | 167 static void |
162 ngx_http_perl_xs_init(pTHX) | 168 ngx_http_perl_xs_init(pTHX) |
163 { | 169 { |
308 | 314 |
309 return rc; | 315 return rc; |
310 } | 316 } |
311 | 317 |
312 | 318 |
319 #if (NGX_HTTP_SSI) | |
320 | |
313 static ngx_int_t | 321 static ngx_int_t |
314 ngx_http_perl_ssi(ngx_http_request_t *r, ngx_http_ssi_ctx_t *ssi_ctx, | 322 ngx_http_perl_ssi(ngx_http_request_t *r, ngx_http_ssi_ctx_t *ssi_ctx, |
315 ngx_str_t **params) | 323 ngx_str_t **params) |
316 { | 324 { |
317 SV *sv; | 325 SV *sv; |
382 ctx->redirect_uri.len = 0; | 390 ctx->redirect_uri.len = 0; |
383 ctx->ssi = NULL; | 391 ctx->ssi = NULL; |
384 | 392 |
385 return rc; | 393 return rc; |
386 } | 394 } |
395 | |
396 #endif | |
387 | 397 |
388 | 398 |
389 static ngx_int_t | 399 static ngx_int_t |
390 ngx_http_perl_get_interpreter(ngx_http_perl_main_conf_t *pmcf, | 400 ngx_http_perl_get_interpreter(ngx_http_perl_main_conf_t *pmcf, |
391 PerlInterpreter **perl, ngx_log_t *log) | 401 PerlInterpreter **perl, ngx_log_t *log) |
761 | 771 |
762 | 772 |
763 static ngx_int_t | 773 static ngx_int_t |
764 ngx_http_perl_preconfiguration(ngx_conf_t *cf) | 774 ngx_http_perl_preconfiguration(ngx_conf_t *cf) |
765 { | 775 { |
776 #if (NGX_HTTP_SSI) | |
766 ngx_int_t rc; | 777 ngx_int_t rc; |
767 ngx_http_ssi_main_conf_t *smcf; | 778 ngx_http_ssi_main_conf_t *smcf; |
768 | 779 |
769 smcf = ngx_http_conf_get_module_main_conf(cf, ngx_http_ssi_filter_module); | 780 smcf = ngx_http_conf_get_module_main_conf(cf, ngx_http_ssi_filter_module); |
770 | 781 |
778 &ngx_http_perl_ssi_command.name); | 789 &ngx_http_perl_ssi_command.name); |
779 } | 790 } |
780 | 791 |
781 return NGX_ERROR; | 792 return NGX_ERROR; |
782 } | 793 } |
794 #endif | |
783 | 795 |
784 return NGX_OK; | 796 return NGX_OK; |
785 } | 797 } |
786 | 798 |
787 | 799 |