summaryrefslogtreecommitdiff
path: root/src/http/modules
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2006-04-21 12:03:18 +0000
committerJonathan Kolb <jon@b0g.us>2006-04-21 12:03:18 +0000
commit984cc0392183bbe02dad30645691f34917b8d78b (patch)
tree318259a5fb9ae7be488084e1d92479c5936999e4 /src/http/modules
parent89fe162fb79c6c3e8c28a4f5a41b2cb2391468da (diff)
downloadnginx-984cc0392183bbe02dad30645691f34917b8d78b.tar.gz
Changes with nginx 0.3.41 21 Apr 2006v0.3.41
*) Feature: the -v switch. *) Bugfix: the segmentation fault may occurred if the SSI page has remote subrequests. *) Bugfix: in FastCGI handling. *) Bugfix: if the perl modules path was not set using --with-perl_modules_path=PATH or the "perl_modules", then the segmentation fault was occurred.
Diffstat (limited to 'src/http/modules')
-rw-r--r--src/http/modules/ngx_http_dav_module.c6
-rw-r--r--src/http/modules/ngx_http_fastcgi_module.c9
-rw-r--r--src/http/modules/ngx_http_static_module.c8
-rw-r--r--src/http/modules/perl/ngx_http_perl_module.c6
4 files changed, 19 insertions, 10 deletions
diff --git a/src/http/modules/ngx_http_dav_module.c b/src/http/modules/ngx_http_dav_module.c
index e60b8cf34..b41bd8e46 100644
--- a/src/http/modules/ngx_http_dav_module.c
+++ b/src/http/modules/ngx_http_dav_module.c
@@ -116,10 +116,6 @@ ngx_http_dav_handler(ngx_http_request_t *r)
return NGX_DECLINED;
}
- if (r->headers_in.content_length_n < 0) {
- return NGX_HTTP_BAD_REQUEST;
- }
-
r->request_body_in_file_only = 1;
r->request_body_in_persistent_file = 1;
r->request_body_delete_incomplete_file = 1;
@@ -312,6 +308,8 @@ ok:
ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
return;
}
+
+ r->headers_out.content_length_n = 0;
}
r->headers_out.status = status;
diff --git a/src/http/modules/ngx_http_fastcgi_module.c b/src/http/modules/ngx_http_fastcgi_module.c
index f901a5223..ff5511804 100644
--- a/src/http/modules/ngx_http_fastcgi_module.c
+++ b/src/http/modules/ngx_http_fastcgi_module.c
@@ -1173,6 +1173,11 @@ ngx_http_fastcgi_input_filter(ngx_event_pipe_t *p, ngx_buf_t *buf)
if (f->type == NGX_HTTP_FASTCGI_STDERR) {
if (f->length) {
+
+ if (f->pos == f->last) {
+ break;
+ }
+
line.data = f->pos;
if (f->pos + f->length <= f->last) {
@@ -1212,6 +1217,10 @@ ngx_http_fastcgi_input_filter(ngx_event_pipe_t *p, ngx_buf_t *buf)
/* f->type == NGX_HTTP_FASTCGI_STDOUT */
+ if (f->pos == f->last) {
+ break;
+ }
+
if (p->free) {
b = p->free->buf;
p->free = p->free->next;
diff --git a/src/http/modules/ngx_http_static_module.c b/src/http/modules/ngx_http_static_module.c
index 0dbec5093..3399e5098 100644
--- a/src/http/modules/ngx_http_static_module.c
+++ b/src/http/modules/ngx_http_static_module.c
@@ -86,6 +86,10 @@ ngx_http_static_handler(ngx_http_request_t *r)
ngx_pool_cleanup_file_t *clnf;
ngx_http_core_loc_conf_t *clcf;
+ if (r->method != NGX_HTTP_GET && r->method != NGX_HTTP_HEAD) {
+ return NGX_HTTP_NOT_ALLOWED;
+ }
+
if (r->uri.data[r->uri.len - 1] == '/') {
return NGX_DECLINED;
}
@@ -95,10 +99,6 @@ ngx_http_static_handler(ngx_http_request_t *r)
return NGX_DECLINED;
}
- if (r->method != NGX_HTTP_GET && r->method != NGX_HTTP_HEAD) {
- return NGX_HTTP_NOT_ALLOWED;
- }
-
rc = ngx_http_discard_body(r);
if (rc != NGX_OK && rc != NGX_AGAIN) {
diff --git a/src/http/modules/perl/ngx_http_perl_module.c b/src/http/modules/perl/ngx_http_perl_module.c
index 136bac397..aa0e41d25 100644
--- a/src/http/modules/perl/ngx_http_perl_module.c
+++ b/src/http/modules/perl/ngx_http_perl_module.c
@@ -483,8 +483,10 @@ ngx_http_perl_init_interpreter(ngx_conf_t *cf, ngx_http_perl_main_conf_t *pmcf)
}
#endif
- if (ngx_conf_full_name(cf->cycle, &pmcf->modules) != NGX_OK) {
- return NGX_CONF_ERROR;
+ if (pmcf->modules.data) {
+ if (ngx_conf_full_name(cf->cycle, &pmcf->modules) != NGX_OK) {
+ return NGX_CONF_ERROR;
+ }
}
PERL_SYS_INIT(&ngx_argc, &ngx_argv);