nginx-0.3.38-RELEASE import
*) 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.
diff --git a/src/http/modules/perl/ngx_http_perl_module.c b/src/http/modules/perl/ngx_http_perl_module.c
index e453dc3..84de262 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 @@
#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 @@
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 @@
uri.len = 0;
}
- ctx->filename = NULL;
+ ctx->filename.data = NULL;
ctx->redirect_uri.len = 0;
if (uri.len) {
@@ -332,7 +339,7 @@
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_free_interpreter(pmcf, ctx->perl);
- ctx->filename = NULL;
+ ctx->filename.data = NULL;
ctx->redirect_uri.len = 0;
ctx->ssi = NULL;
@@ -631,8 +638,7 @@
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) {