diff src/http/modules/perl/nginx.xs @ 270:6eb1e38f0f1f NGINX_0_5_5

nginx 0.5.5 *) Change: the -v switch does not show compiler information any more. *) Feature: the -V switch. *) Feature: the "worker_rlimit_core" directive supports size in K, M, and G. *) Bugfix: the nginx.pm module now could be installed by an unprivileged user. *) Bugfix: a segmentation fault might occur if the $r->request_body or $r->request_body_file methods were used. *) Bugfix: the ppc platform specific bugs.
author Igor Sysoev <http://sysoev.ru>
date Sun, 24 Dec 2006 00:00:00 +0300
parents 251bcd11a5b8
children c5c2b2883984
line wrap: on
line diff
--- a/src/http/modules/perl/nginx.xs
+++ b/src/http/modules/perl/nginx.xs
@@ -387,7 +387,10 @@ request_body(r)
 
     ngx_http_perl_set_request(r);
 
-    if (r->request_body->temp_file || r->request_body->bufs == NULL) {
+    if (r->request_body == NULL
+        || r->request_body->temp_file
+        || r->request_body->bufs == NULL)
+    {
         XSRETURN_UNDEF;
     }
 
@@ -411,7 +414,7 @@ request_body_file(r)
 
     ngx_http_perl_set_request(r);
 
-    if (r->request_body->temp_file == NULL) {
+    if (r->request_body == NULL || r->request_body->temp_file == NULL) {
         XSRETURN_UNDEF;
     }