summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/http/ngx_http.c2
-rw-r--r--src/http/ngx_http_core_module.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/http/ngx_http.c b/src/http/ngx_http.c
index 73c08d593..5c628849f 100644
--- a/src/http/ngx_http.c
+++ b/src/http/ngx_http.c
@@ -1130,7 +1130,7 @@ ngx_http_create_locations_tree(ngx_conf_t *cf, ngx_queue_t *locations,
node->auto_redirect = (u_char) ((lq->exact && lq->exact->auto_redirect)
|| (lq->inclusive && lq->inclusive->auto_redirect));
- node->len = (u_char) len;
+ node->len = (u_short) len;
ngx_memcpy(node->name, &lq->name->data[prefix], len);
ngx_queue_split(locations, q, &tail);
diff --git a/src/http/ngx_http_core_module.h b/src/http/ngx_http_core_module.h
index 49bbd4aa9..1c56264c6 100644
--- a/src/http/ngx_http_core_module.h
+++ b/src/http/ngx_http_core_module.h
@@ -463,8 +463,8 @@ struct ngx_http_location_tree_node_s {
ngx_http_core_loc_conf_t *exact;
ngx_http_core_loc_conf_t *inclusive;
+ u_short len;
u_char auto_redirect;
- u_char len;
u_char name[1];
};