Mercurial > hg > nginx-ranges
comparison src/http/ngx_http_variables.c @ 178:87699398f955 NGINX_0_3_36
nginx 0.3.36
*) Feature: the ngx_http_addition_filter_module.
*) Feature: the "proxy_pass" and "fastcgi_pass" directives may be used
inside the "if" block.
*) Feature: the "proxy_ignore_client_abort" and
"fastcgi_ignore_client_abort" directives.
*) Feature: the "$request_completion" variable.
*) Feature: the ngx_http_perl_module supports the $r->request_method
and $r->remote_addr.
*) Feature: the ngx_http_ssi_module supports the "elif" command.
*) Bugfix: the "\/" string in the expression of the "if" command of the
ngx_http_ssi_module was treated incorrectly.
*) Bugfix: in the regular expressions in the "if" command of the
ngx_http_ssi_module.
*) Bugfix: if the relative path was specified in the
"client_body_temp_path", "proxy_temp_path", "fastcgi_temp_path", and
"perl_modules" directives, then the directory was used relatively to
a current path but not to a server prefix.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Wed, 05 Apr 2006 00:00:00 +0400 |
parents | 73e8476f9142 |
children | 71ff1e2b484a |
comparison
equal
deleted
inserted
replaced
177:4a3ddd758222 | 178:87699398f955 |
---|---|
41 static ngx_int_t ngx_http_variable_request_method(ngx_http_request_t *r, | 41 static ngx_int_t ngx_http_variable_request_method(ngx_http_request_t *r, |
42 ngx_http_variable_value_t *v, uintptr_t data); | 42 ngx_http_variable_value_t *v, uintptr_t data); |
43 static ngx_int_t ngx_http_variable_remote_user(ngx_http_request_t *r, | 43 static ngx_int_t ngx_http_variable_remote_user(ngx_http_request_t *r, |
44 ngx_http_variable_value_t *v, uintptr_t data); | 44 ngx_http_variable_value_t *v, uintptr_t data); |
45 static ngx_int_t ngx_http_variable_body_bytes_sent(ngx_http_request_t *r, | 45 static ngx_int_t ngx_http_variable_body_bytes_sent(ngx_http_request_t *r, |
46 ngx_http_variable_value_t *v, uintptr_t data); | |
47 static ngx_int_t ngx_http_variable_request_completion(ngx_http_request_t *r, | |
46 ngx_http_variable_value_t *v, uintptr_t data); | 48 ngx_http_variable_value_t *v, uintptr_t data); |
47 | 49 |
48 | 50 |
49 /* | 51 /* |
50 * TODO: | 52 * TODO: |
133 { ngx_string("remote_user"), ngx_http_variable_remote_user, 0, 0, 0 }, | 135 { ngx_string("remote_user"), ngx_http_variable_remote_user, 0, 0, 0 }, |
134 | 136 |
135 { ngx_string("body_bytes_sent"), ngx_http_variable_body_bytes_sent, | 137 { ngx_string("body_bytes_sent"), ngx_http_variable_body_bytes_sent, |
136 0, 0, 0 }, | 138 0, 0, 0 }, |
137 | 139 |
140 { ngx_string("request_completion"), ngx_http_variable_request_completion, | |
141 0, 0, 0 }, | |
142 | |
138 { ngx_null_string, NULL, 0, 0, 0 } | 143 { ngx_null_string, NULL, 0, 0, 0 } |
139 }; | 144 }; |
140 | 145 |
141 | 146 |
142 ngx_http_variable_value_t ngx_http_variable_null_value = | 147 ngx_http_variable_value_t ngx_http_variable_null_value = |
796 | 801 |
797 return NGX_OK; | 802 return NGX_OK; |
798 } | 803 } |
799 | 804 |
800 | 805 |
806 static ngx_int_t | |
807 ngx_http_variable_request_completion(ngx_http_request_t *r, | |
808 ngx_http_variable_value_t *v, uintptr_t data) | |
809 { | |
810 if (r->request_complete) { | |
811 v->len = 2; | |
812 v->valid = 1; | |
813 v->no_cachable = 0; | |
814 v->not_found = 0; | |
815 v->data = (u_char *) "OK"; | |
816 | |
817 return NGX_OK; | |
818 } | |
819 | |
820 v->len = 0; | |
821 v->valid = 1; | |
822 v->no_cachable = 0; | |
823 v->not_found = 0; | |
824 v->data = (u_char *) ""; | |
825 | |
826 return NGX_OK; | |
827 } | |
828 | |
829 | |
801 ngx_int_t | 830 ngx_int_t |
802 ngx_http_variables_add_core_vars(ngx_conf_t *cf) | 831 ngx_http_variables_add_core_vars(ngx_conf_t *cf) |
803 { | 832 { |
804 ngx_int_t rc; | 833 ngx_int_t rc; |
805 ngx_http_variable_t *v; | 834 ngx_http_variable_t *v; |