diff options
author | Igor Sysoev <igor@sysoev.ru> | 2009-09-24 13:23:25 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2009-09-24 13:23:25 +0000 |
commit | f63a48ce7e5da6d1b536345df3c4d20f9ead43f1 (patch) | |
tree | 686ad8539504d85873864f27c4a39f5b8dad80d6 /src/http/ngx_http_request.c | |
parent | 6749e92938fffdb8a4de921123100d770c0653d0 (diff) | |
download | nginx-f63a48ce7e5da6d1b536345df3c4d20f9ead43f1.tar.gz nginx-f63a48ce7e5da6d1b536345df3c4d20f9ead43f1.zip |
update the previous commit: use ngx_strlow()
Diffstat (limited to 'src/http/ngx_http_request.c')
-rw-r--r-- | src/http/ngx_http_request.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c index e755e9c2c..48b57206b 100644 --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -1616,7 +1616,7 @@ static ssize_t 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 @@ ngx_http_validate_host(ngx_http_request_t *r, u_char **host, size_t len, } 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; |