aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2006-03-15 09:53:04 +0000
committerIgor Sysoev <igor@sysoev.ru>2006-03-15 09:53:04 +0000
commit8fea885cbf8d63d67ee6b7ea82e3e0438182ac36 (patch)
tree232fb0db90b71aeb124c970bf619f3dd1de19aac /src/http/modules
parent5e40d785cbb896a9ed218c6a599863f2a82aa721 (diff)
downloadnginx-release-0.3.33.tar.gz
nginx-release-0.3.33.zip
nginx-0.3.33-RELEASE importrelease-0.3.33
*) Feature: the "http_503" parameter of the "proxy_next_upstream" or "fastcgi_next_upstream" directives. *) Bugfix: ngx_http_perl_module did not work with inlined in the configuration code, if it was not started with the "sub" word. *) Bugfix: in the "post_action" directive.
Diffstat (limited to 'src/http/modules')
-rw-r--r--src/http/modules/ngx_http_fastcgi_module.c1
-rw-r--r--src/http/modules/ngx_http_proxy_module.c1
-rw-r--r--src/http/modules/perl/ngx_http_perl_module.c14
3 files changed, 13 insertions, 3 deletions
diff --git a/src/http/modules/ngx_http_fastcgi_module.c b/src/http/modules/ngx_http_fastcgi_module.c
index 715b07020..66e221f2b 100644
--- a/src/http/modules/ngx_http_fastcgi_module.c
+++ b/src/http/modules/ngx_http_fastcgi_module.c
@@ -161,6 +161,7 @@ static ngx_conf_bitmask_t ngx_http_fastcgi_next_upstream_masks[] = {
{ ngx_string("timeout"), NGX_HTTP_UPSTREAM_FT_TIMEOUT },
{ ngx_string("invalid_header"), NGX_HTTP_UPSTREAM_FT_INVALID_HEADER },
{ ngx_string("http_500"), NGX_HTTP_UPSTREAM_FT_HTTP_500 },
+ { ngx_string("http_503"), NGX_HTTP_UPSTREAM_FT_HTTP_503 },
{ ngx_string("http_404"), NGX_HTTP_UPSTREAM_FT_HTTP_404 },
{ ngx_null_string, 0 }
};
diff --git a/src/http/modules/ngx_http_proxy_module.c b/src/http/modules/ngx_http_proxy_module.c
index 34e6dd197..e8d310753 100644
--- a/src/http/modules/ngx_http_proxy_module.c
+++ b/src/http/modules/ngx_http_proxy_module.c
@@ -121,6 +121,7 @@ static ngx_conf_bitmask_t ngx_http_proxy_next_upstream_masks[] = {
{ ngx_string("timeout"), NGX_HTTP_UPSTREAM_FT_TIMEOUT },
{ ngx_string("invalid_header"), NGX_HTTP_UPSTREAM_FT_INVALID_HEADER },
{ ngx_string("http_500"), NGX_HTTP_UPSTREAM_FT_HTTP_500 },
+ { ngx_string("http_503"), NGX_HTTP_UPSTREAM_FT_HTTP_503 },
{ ngx_string("http_404"), NGX_HTTP_UPSTREAM_FT_HTTP_404 },
{ ngx_null_string, 0 }
};
diff --git a/src/http/modules/perl/ngx_http_perl_module.c b/src/http/modules/perl/ngx_http_perl_module.c
index 0a982e6e4..0bcad5ccb 100644
--- a/src/http/modules/perl/ngx_http_perl_module.c
+++ b/src/http/modules/perl/ngx_http_perl_module.c
@@ -692,10 +692,18 @@ ngx_http_perl_call_handler(pTHX_ ngx_http_request_t *r, SV *sub,
static void
ngx_http_perl_eval_anon_sub(pTHX_ ngx_str_t *handler, SV **sv)
{
- if (ngx_strncmp(handler->data, "sub ", 4) == 0
- || ngx_strncmp(handler->data, "use ", 4) == 0)
+ u_char *p;
+
+ for (p = handler->data; *p; p++) {
+ if (*p != ' ' && *p != '\t' && *p != CR && *p != LF) {
+ break;
+ }
+ }
+
+ if (ngx_strncmp(p, "sub ", 4) == 0
+ || ngx_strncmp(p, "use ", 4) == 0)
{
- *sv = eval_pv((char *) handler->data, FALSE);
+ *sv = eval_pv((char *) p, FALSE);
return;
}