comparison src/http/ngx_http_variables.c @ 647:95d7da23ea53 release-0.3.45

nginx-0.3.45-RELEASE import *) Feature: the "ssl_verify_client", "ssl_verify_depth", and "ssl_client_certificate" directives. *) Change: the $request_method variable now returns the main request method. *) Change: the ° symbol codes were changed in koi-win conversion table. *) Feature: the euro and N symbols were added to koi-win conversion table. *) Bugfix: if nginx distributed the requests among several backends and some backend failed, then requests intended for this backend was directed to one live backend only instead of being distributed among the rest.
author Igor Sysoev <igor@sysoev.ru>
date Sat, 06 May 2006 16:28:56 +0000
parents 5e8fb59c18c1
children 400711951595
comparison
equal deleted inserted replaced
646:f198dec3e3af 647:95d7da23ea53
808 808
809 static ngx_int_t 809 static ngx_int_t
810 ngx_http_variable_request_method(ngx_http_request_t *r, 810 ngx_http_variable_request_method(ngx_http_request_t *r,
811 ngx_http_variable_value_t *v, uintptr_t data) 811 ngx_http_variable_value_t *v, uintptr_t data)
812 { 812 {
813 if (r->method_name.data) { 813 if (r->main->method_name.data) {
814 if (r->upstream && r->upstream->method.len) { 814 v->len = r->main->method_name.len;
815 v->len = r->upstream->method.len;
816 v->data = r->upstream->method.data;
817
818 } else {
819 v->len = r->method_name.len;
820 v->data = r->method_name.data;
821 }
822
823 v->valid = 1; 815 v->valid = 1;
824 v->no_cachable = 0; 816 v->no_cachable = 0;
825 v->not_found = 0; 817 v->not_found = 0;
818 v->data = r->main->method_name.data;
826 819
827 } else { 820 } else {
828 v->not_found = 1; 821 v->not_found = 1;
829 } 822 }
830 823