diff options
| author | 2012-08-21 11:31:52 +0000 | |
|---|---|---|
| committer | 2012-08-21 11:31:52 +0000 | |
| commit | c435ee91f14b21ec908900a5ca8979a45be2deb0 (patch) | |
| tree | c14774a082d3a395da540459980b9ad870ffde52 /usr.sbin/nginx/src/http/modules | |
| parent | Missing "-q" in usage(). (diff) | |
| download | wireguard-openbsd-c435ee91f14b21ec908900a5ca8979a45be2deb0.tar.xz wireguard-openbsd-c435ee91f14b21ec908900a5ca8979a45be2deb0.zip | |
update to nginx-1.2.3
Diffstat (limited to 'usr.sbin/nginx/src/http/modules')
6 files changed, 10 insertions, 11 deletions
diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_limit_conn_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_limit_conn_module.c index c23c046ed4d..106da7a535e 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_limit_conn_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_limit_conn_module.c @@ -238,7 +238,7 @@ ngx_http_limit_conn_handler(ngx_http_request_t *r) } ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, - "limit zone: %08XD %d", node->key, lc->conn); + "limit conn: %08XD %d", node->key, lc->conn); ngx_shmtx_unlock(&shpool->mutex); @@ -358,7 +358,7 @@ ngx_http_limit_conn_cleanup(void *data) ngx_shmtx_lock(&shpool->mutex); ngx_log_debug2(NGX_LOG_DEBUG_HTTP, lccln->shm_zone->shm.log, 0, - "limit zone cleanup: %08XD %d", node->key, lc->conn); + "limit conn cleanup: %08XD %d", node->key, lc->conn); lc->conn--; diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_log_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_log_module.c index edb145992a6..5b9c7998696 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_log_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_log_module.c @@ -218,7 +218,7 @@ static ngx_http_log_var_t ngx_http_log_vars[] = { }; -ngx_int_t +static ngx_int_t ngx_http_log_handler(ngx_http_request_t *r) { u_char *line, *p; diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_map_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_map_module.c index 2fe925f1cc1..e8a4ab4cc18 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_map_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_map_module.c @@ -110,7 +110,6 @@ ngx_http_map_variable(ngx_http_request_t *r, ngx_http_variable_value_t *v, { ngx_http_map_ctx_t *map = (ngx_http_map_ctx_t *) data; - size_t len; ngx_str_t val; ngx_http_variable_value_t *value; @@ -121,10 +120,8 @@ ngx_http_map_variable(ngx_http_request_t *r, ngx_http_variable_value_t *v, return NGX_ERROR; } - len = val.len; - - if (len && map->hostnames && val.data[len - 1] == '.') { - len--; + if (map->hostnames && val.len > 0 && val.data[val.len - 1] == '.') { + val.len--; } value = ngx_http_map_find(r, &map->map, &val); @@ -281,6 +278,8 @@ ngx_http_map_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) map->default_value = ctx.default_value ? ctx.default_value: &ngx_http_variable_null_value; + map->hostnames = ctx.hostnames; + hash.key = ngx_hash_key_lc; hash.max_size = mcf->hash_max_size; hash.bucket_size = mcf->hash_bucket_size; diff --git a/usr.sbin/nginx/src/http/modules/ngx_http_upstream_least_conn_module.c b/usr.sbin/nginx/src/http/modules/ngx_http_upstream_least_conn_module.c index 50e68b21b90..21156ae1aef 100644 --- a/usr.sbin/nginx/src/http/modules/ngx_http_upstream_least_conn_module.c +++ b/usr.sbin/nginx/src/http/modules/ngx_http_upstream_least_conn_module.c @@ -81,7 +81,7 @@ ngx_module_t ngx_http_upstream_least_conn_module = { }; -ngx_int_t +static ngx_int_t ngx_http_upstream_init_least_conn(ngx_conf_t *cf, ngx_http_upstream_srv_conf_t *us) { diff --git a/usr.sbin/nginx/src/http/modules/perl/nginx.pm b/usr.sbin/nginx/src/http/modules/perl/nginx.pm index 117ffd837f6..7f825475adb 100644 --- a/usr.sbin/nginx/src/http/modules/perl/nginx.pm +++ b/usr.sbin/nginx/src/http/modules/perl/nginx.pm @@ -50,7 +50,7 @@ our @EXPORT = qw( HTTP_INSUFFICIENT_STORAGE ); -our $VERSION = '1.2.1'; +our $VERSION = '1.2.3'; require XSLoader; XSLoader::load('nginx', $VERSION); diff --git a/usr.sbin/nginx/src/http/modules/perl/nginx.xs b/usr.sbin/nginx/src/http/modules/perl/nginx.xs index ecd11ffbc07..ed974391163 100644 --- a/usr.sbin/nginx/src/http/modules/perl/nginx.xs +++ b/usr.sbin/nginx/src/http/modules/perl/nginx.xs @@ -476,7 +476,7 @@ header_out(r, key, value) } if (header->key.len == sizeof("Content-Encoding") - 1 - && ngx_strncasecmp(header->key.data, "Content-Encoding", + && ngx_strncasecmp(header->key.data, (u_char *) "Content-Encoding", sizeof("Content-Encoding") - 1) == 0) { r->headers_out.content_encoding = header; |
