summaryrefslogtreecommitdiff
path: root/src/http/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/modules')
-rw-r--r--src/http/modules/ngx_http_limit_req_module.c2
-rw-r--r--src/http/modules/ngx_http_upstream_ip_hash_module.c5
-rw-r--r--src/http/modules/ngx_http_upstream_least_conn_module.c5
-rw-r--r--src/http/modules/perl/Makefile.PL6
-rw-r--r--src/http/modules/perl/nginx.pm2
5 files changed, 16 insertions, 4 deletions
diff --git a/src/http/modules/ngx_http_limit_req_module.c b/src/http/modules/ngx_http_limit_req_module.c
index 934292e7f..90434c956 100644
--- a/src/http/modules/ngx_http_limit_req_module.c
+++ b/src/http/modules/ngx_http_limit_req_module.c
@@ -795,7 +795,7 @@ ngx_http_limit_req_zone(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
}
rate = ngx_atoi(value[i].data + 5, len - 5);
- if (rate <= NGX_ERROR) {
+ if (rate <= 0) {
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
"invalid rate \"%V\"", &value[i]);
return NGX_CONF_ERROR;
diff --git a/src/http/modules/ngx_http_upstream_ip_hash_module.c b/src/http/modules/ngx_http_upstream_ip_hash_module.c
index 89ccc2b85..29c74fd54 100644
--- a/src/http/modules/ngx_http_upstream_ip_hash_module.c
+++ b/src/http/modules/ngx_http_upstream_ip_hash_module.c
@@ -252,6 +252,11 @@ ngx_http_upstream_ip_hash(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
uscf = ngx_http_conf_get_module_srv_conf(cf, ngx_http_upstream_module);
+ if (uscf->peer.init_upstream) {
+ ngx_conf_log_error(NGX_LOG_WARN, cf, 0,
+ "load balancing method redefined");
+ }
+
uscf->peer.init_upstream = ngx_http_upstream_init_ip_hash;
uscf->flags = NGX_HTTP_UPSTREAM_CREATE
diff --git a/src/http/modules/ngx_http_upstream_least_conn_module.c b/src/http/modules/ngx_http_upstream_least_conn_module.c
index 6066ed2bb..87c4d8d61 100644
--- a/src/http/modules/ngx_http_upstream_least_conn_module.c
+++ b/src/http/modules/ngx_http_upstream_least_conn_module.c
@@ -387,6 +387,11 @@ ngx_http_upstream_least_conn(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
uscf = ngx_http_conf_get_module_srv_conf(cf, ngx_http_upstream_module);
+ if (uscf->peer.init_upstream) {
+ ngx_conf_log_error(NGX_LOG_WARN, cf, 0,
+ "load balancing method redefined");
+ }
+
uscf->peer.init_upstream = ngx_http_upstream_init_least_conn;
uscf->flags = NGX_HTTP_UPSTREAM_CREATE
diff --git a/src/http/modules/perl/Makefile.PL b/src/http/modules/perl/Makefile.PL
index 78a1e516b..ff8b2c634 100644
--- a/src/http/modules/perl/Makefile.PL
+++ b/src/http/modules/perl/Makefile.PL
@@ -21,8 +21,10 @@ WriteMakefile(
} (split /\s+/, $ENV{NGX_INCS})),
depend => {
- 'nginx.c' =>
- "../../../../../src/http/modules/perl/ngx_http_perl_module.h"
+ 'nginx.c' => join(" ", map {
+ "../../../../../$_"
+ } (split(/\s+/, $ENV{NGX_DEPS}),
+ "src/http/modules/perl/ngx_http_perl_module.h"))
},
PM => {
diff --git a/src/http/modules/perl/nginx.pm b/src/http/modules/perl/nginx.pm
index 435199d3a..e3f736110 100644
--- a/src/http/modules/perl/nginx.pm
+++ b/src/http/modules/perl/nginx.pm
@@ -50,7 +50,7 @@ our @EXPORT = qw(
HTTP_INSUFFICIENT_STORAGE
);
-our $VERSION = '1.3.15';
+our $VERSION = '%%VERSION%%';
require XSLoader;
XSLoader::load('nginx', $VERSION);