Mercurial > hg > nginx
changeset 3153:90d6b878481f
update the previous commit: use ngx_strlow()
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 24 Sep 2009 13:23:25 +0000 |
parents | 8bf534c7c998 |
children | 823f72db46c0 |
files | src/http/ngx_http_request.c |
diffstat | 1 files changed, 4 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/ngx_http_request.c Thu Sep 24 13:15:50 2009 +0000 +++ b/src/http/ngx_http_request.c Thu Sep 24 13:23:25 2009 +0000 @@ -1616,7 +1616,7 @@ ngx_http_validate_host(ngx_http_request_t *r, u_char **host, size_t len, ngx_uint_t alloc) { - u_char *p, *h, ch; + u_char *h, ch; size_t i, last; ngx_uint_t dot; @@ -1657,16 +1657,12 @@ } if (alloc) { - p = ngx_pnalloc(r->pool, last) ; - if (p == NULL) { + *host = ngx_pnalloc(r->pool, last) ; + if (*host == NULL) { return -1; } - *host = p; - - for (i = 0; i < last; i++) { - *p++ = ngx_tolower(h[i]); - } + ngx_strlow(*host, h, last); } return last;