Mercurial > hg > nginx-vendor-1-0
comparison src/core/ngx_hash.c @ 382:984bb0b1399b NGINX_0_7_3
nginx 0.7.3
*) Change: the "rss" extension MIME type has been changed to
"application/rss+xml".
*) Change: now the "gzip_vary" directive turned on issues a
"Vary: Accept-Encoding" header line for uncompressed responses too.
*) Feature: now the "rewrite" directive does a redirect automatically
if the "https://" protocol is used.
*) Bugfix: the "proxy_pass" directive did not work with the HTTPS
protocol; the bug had appeared in 0.6.9.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 23 Jun 2008 00:00:00 +0400 |
parents | 1c519aff5c0c |
children | 34fb3a573548 |
comparison
equal
deleted
inserted
replaced
381:23d1555141d9 | 382:984bb0b1399b |
---|---|
837 if (name == NULL) { | 837 if (name == NULL) { |
838 return NGX_ERROR; | 838 return NGX_ERROR; |
839 } | 839 } |
840 | 840 |
841 name->len = last - 1; | 841 name->len = last - 1; |
842 name->data = ngx_palloc(ha->temp_pool, name->len); | 842 name->data = ngx_pnalloc(ha->temp_pool, name->len); |
843 if (name->data == NULL) { | 843 if (name->data == NULL) { |
844 return NGX_ERROR; | 844 return NGX_ERROR; |
845 } | 845 } |
846 | 846 |
847 ngx_memcpy(name->data, &key->data[1], name->len); | 847 ngx_memcpy(name->data, &key->data[1], name->len); |
853 /* | 853 /* |
854 * convert "*.example.com" to "com.example.\0" | 854 * convert "*.example.com" to "com.example.\0" |
855 * and ".example.com" to "com.example\0" | 855 * and ".example.com" to "com.example\0" |
856 */ | 856 */ |
857 | 857 |
858 p = ngx_palloc(ha->temp_pool, last); | 858 p = ngx_pnalloc(ha->temp_pool, last); |
859 if (p == NULL) { | 859 if (p == NULL) { |
860 return NGX_ERROR; | 860 return NGX_ERROR; |
861 } | 861 } |
862 | 862 |
863 len = 0; | 863 len = 0; |
889 | 889 |
890 /* convert "www.example.*" to "www.example\0" */ | 890 /* convert "www.example.*" to "www.example\0" */ |
891 | 891 |
892 last++; | 892 last++; |
893 | 893 |
894 p = ngx_palloc(ha->temp_pool, last); | 894 p = ngx_pnalloc(ha->temp_pool, last); |
895 if (p == NULL) { | 895 if (p == NULL) { |
896 return NGX_ERROR; | 896 return NGX_ERROR; |
897 } | 897 } |
898 | 898 |
899 ngx_cpystrn(p, key->data, last); | 899 ngx_cpystrn(p, key->data, last); |
942 if (name == NULL) { | 942 if (name == NULL) { |
943 return NGX_ERROR; | 943 return NGX_ERROR; |
944 } | 944 } |
945 | 945 |
946 name->len = last - skip; | 946 name->len = last - skip; |
947 name->data = ngx_palloc(ha->temp_pool, name->len); | 947 name->data = ngx_pnalloc(ha->temp_pool, name->len); |
948 if (name->data == NULL) { | 948 if (name->data == NULL) { |
949 return NGX_ERROR; | 949 return NGX_ERROR; |
950 } | 950 } |
951 | 951 |
952 ngx_memcpy(name->data, key->data + skip, name->len); | 952 ngx_memcpy(name->data, key->data + skip, name->len); |