Mercurial > hg > nginx-ranges
comparison src/core/ngx_conf_file.c @ 198:e6da4931e0e0 NGINX_0_3_46
nginx 0.3.46
*) Feature: the "proxy_hide_header", "proxy_pass_header",
"fastcgi_hide_header", and "fastcgi_pass_header" directives.
*) Change: the "proxy_pass_x_powered_by", "fastcgi_x_powered_by", and
"proxy_pass_server" directives were canceled.
*) Feature: the "X-Accel-Buffering" response header line is supported
in proxy mode.
*) Bugfix: the reconfiguration bug and memory leaks in the
ngx_http_perl_module.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Thu, 11 May 2006 00:00:00 +0400 |
parents | 003bd800ec2a |
children | 56688ed172c8 |
comparison
equal
deleted
inserted
replaced
197:93658b91fad2 | 198:e6da4931e0e0 |
---|---|
898 return NGX_CONF_OK; | 898 return NGX_CONF_OK; |
899 } | 899 } |
900 | 900 |
901 | 901 |
902 char * | 902 char * |
903 ngx_conf_set_table_elt_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) | 903 ngx_conf_set_str_array_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) |
904 { | |
905 char *p = conf; | |
906 | |
907 ngx_str_t *value, *s; | |
908 ngx_array_t **a; | |
909 ngx_conf_post_t *post; | |
910 | |
911 a = (ngx_array_t **) (p + cmd->offset); | |
912 | |
913 if (*a == NULL) { | |
914 *a = ngx_array_create(cf->pool, 4, sizeof(ngx_str_t)); | |
915 if (*a == NULL) { | |
916 return NGX_CONF_ERROR; | |
917 } | |
918 } | |
919 | |
920 s = ngx_array_push(*a); | |
921 if (s == NULL) { | |
922 return NGX_CONF_ERROR; | |
923 } | |
924 | |
925 value = cf->args->elts; | |
926 | |
927 *s = value[1]; | |
928 | |
929 if (cmd->post) { | |
930 post = cmd->post; | |
931 return post->post_handler(cf, post, s); | |
932 } | |
933 | |
934 return NGX_CONF_OK; | |
935 } | |
936 | |
937 | |
938 char * | |
939 ngx_conf_set_keyval_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) | |
904 { | 940 { |
905 char *p = conf; | 941 char *p = conf; |
906 | 942 |
907 ngx_str_t *value; | 943 ngx_str_t *value; |
908 ngx_array_t **a; | 944 ngx_array_t **a; |
909 ngx_table_elt_t *elt; | 945 ngx_keyval_t *kv; |
910 ngx_conf_post_t *post; | 946 ngx_conf_post_t *post; |
911 | 947 |
912 a = (ngx_array_t **) (p + cmd->offset); | 948 a = (ngx_array_t **) (p + cmd->offset); |
913 | 949 |
914 if (*a == NULL) { | 950 if (*a == NULL) { |
915 *a = ngx_array_create(cf->pool, 4, sizeof(ngx_table_elt_t)); | 951 *a = ngx_array_create(cf->pool, 4, sizeof(ngx_keyval_t)); |
916 if (*a == NULL) { | 952 if (*a == NULL) { |
917 return NGX_CONF_ERROR; | 953 return NGX_CONF_ERROR; |
918 } | 954 } |
919 } | 955 } |
920 | 956 |
921 elt = ngx_array_push(*a); | 957 kv = ngx_array_push(*a); |
922 if (elt == NULL) { | 958 if (kv == NULL) { |
923 return NGX_CONF_ERROR; | 959 return NGX_CONF_ERROR; |
924 } | 960 } |
925 | 961 |
926 value = cf->args->elts; | 962 value = cf->args->elts; |
927 | 963 |
928 elt->hash = 0; | 964 kv->key = value[1]; |
929 elt->key = value[1]; | 965 kv->value = value[2]; |
930 elt->value = value[2]; | |
931 | 966 |
932 if (cmd->post) { | 967 if (cmd->post) { |
933 post = cmd->post; | 968 post = cmd->post; |
934 return post->post_handler(cf, post, elt); | 969 return post->post_handler(cf, post, kv); |
935 } | 970 } |
936 | 971 |
937 return NGX_CONF_OK; | 972 return NGX_CONF_OK; |
938 } | 973 } |
939 | 974 |