diff options
author | Igor Sysoev <igor@sysoev.ru> | 2006-04-14 09:53:38 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2006-04-14 09:53:38 +0000 |
commit | 8a2b2fb4fbd1801a5fb70d86384f2c6fd13c32c3 (patch) | |
tree | c0f7531cdc57da852f65d2d02bf11888bba63fe6 /src/http/modules/perl/ngx_http_perl_module.c | |
parent | 2b1b55d025e0444978e1fcf4580217eb391860e0 (diff) | |
download | nginx-release-0.3.38.tar.gz nginx-release-0.3.38.zip |
nginx-0.3.38-RELEASE importrelease-0.3.38
*) Feature: the ngx_http_dav_module.
*) Change: the ngx_http_perl_module optimizations.
Thanks to Sergey Skvortsov.
*) Feature: the ngx_http_perl_module supports the $r->request_body_file
method.
*) Feature: the "client_body_in_file_only" directive.
*) Workaround: now on disk overflow nginx tries to write access logs
once a second only.
Thanks to Anton Yuzhaninov and Maxim Dounin.
*) Bugfix: now the "limit_rate" directive more precisely limits rate if
rate is more than 100 Kbyte/s.
Thanks to ForJest.
*) Bugfix: now the IMAP/POP3 proxy escapes the "\r" and "\n" symbols in
login and password to pass authorization server.
Thanks to Maxim Dounin.
Diffstat (limited to 'src/http/modules/perl/ngx_http_perl_module.c')
-rw-r--r-- | src/http/modules/perl/ngx_http_perl_module.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/http/modules/perl/ngx_http_perl_module.c b/src/http/modules/perl/ngx_http_perl_module.c index e453dc38b..84de2627a 100644 --- a/src/http/modules/perl/ngx_http_perl_module.c +++ b/src/http/modules/perl/ngx_http_perl_module.c @@ -165,10 +165,14 @@ static ngx_http_ssi_command_t ngx_http_perl_ssi_command = { #endif +static HV *nginx_stash; + static void ngx_http_perl_xs_init(pTHX) { newXS("DynaLoader::boot_DynaLoader", boot_DynaLoader, __FILE__); + + nginx_stash = gv_stashpv("nginx", TRUE); } @@ -182,6 +186,9 @@ ngx_http_perl_handler(ngx_http_request_t *r) return NGX_HTTP_NOT_FOUND; } + r->request_body_in_single_buf = 1; + r->request_body_in_persistent_file = 1; + rc = ngx_http_read_client_request_body(r, ngx_http_perl_handle_request); if (rc >= NGX_HTTP_SPECIAL_RESPONSE) { @@ -259,7 +266,7 @@ ngx_http_perl_handle_request(ngx_http_request_t *r) uri.len = 0; } - ctx->filename = NULL; + ctx->filename.data = NULL; ctx->redirect_uri.len = 0; if (uri.len) { @@ -332,7 +339,7 @@ ngx_http_perl_variable(ngx_http_request_t *r, ngx_http_variable_value_t *v, v->not_found = 1; } - ctx->filename = NULL; + ctx->filename.data = NULL; ctx->redirect_uri.len = 0; return rc; @@ -409,7 +416,7 @@ ngx_http_perl_ssi(ngx_http_request_t *r, ngx_http_ssi_ctx_t *ssi_ctx, ngx_http_perl_free_interpreter(pmcf, ctx->perl); - ctx->filename = NULL; + ctx->filename.data = NULL; ctx->redirect_uri.len = 0; ctx->ssi = NULL; @@ -631,8 +638,7 @@ ngx_http_perl_call_handler(pTHX_ ngx_http_request_t *r, SV *sub, PUSHMARK(sp); - sv = sv_newmortal(); - sv_setref_pv(sv, "nginx", r); + sv = sv_2mortal(sv_bless(newRV_noinc(newSViv(PTR2IV(r))), nginx_stash)); XPUSHs(sv); if (args) { |