Mercurial > hg > nginx
comparison src/http/modules/ngx_http_proxy_module.c @ 5060:8fff74441755 stable-1.2
Merge of r5013: proxy: fixed proxy_method to always add space.
Before the patch if proxy_method was specified at http{} level the code
to add trailing space wasn't executed, resulting in incorrect requests
to upstream.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 11 Feb 2013 15:31:10 +0000 |
parents | 30fe1b1acf93 |
children | abfe9e6e72cb |
comparison
equal
deleted
inserted
replaced
5059:0419c3321bf2 | 5060:8fff74441755 |
---|---|
2606 * conf->upstream.uri = { 0, NULL }; | 2606 * conf->upstream.uri = { 0, NULL }; |
2607 * conf->upstream.location = NULL; | 2607 * conf->upstream.location = NULL; |
2608 * conf->upstream.store_lengths = NULL; | 2608 * conf->upstream.store_lengths = NULL; |
2609 * conf->upstream.store_values = NULL; | 2609 * conf->upstream.store_values = NULL; |
2610 * | 2610 * |
2611 * conf->method = NULL; | 2611 * conf->method = { 0, NULL }; |
2612 * conf->headers_source = NULL; | 2612 * conf->headers_source = NULL; |
2613 * conf->headers_set_len = NULL; | 2613 * conf->headers_set_len = NULL; |
2614 * conf->headers_set = NULL; | 2614 * conf->headers_set = NULL; |
2615 * conf->headers_set_hash = NULL; | 2615 * conf->headers_set_hash = NULL; |
2616 * conf->body_set_len = NULL; | 2616 * conf->body_set_len = NULL; |
2905 ngx_conf_merge_msec_value(conf->upstream.cache_lock_timeout, | 2905 ngx_conf_merge_msec_value(conf->upstream.cache_lock_timeout, |
2906 prev->upstream.cache_lock_timeout, 5000); | 2906 prev->upstream.cache_lock_timeout, 5000); |
2907 | 2907 |
2908 #endif | 2908 #endif |
2909 | 2909 |
2910 if (conf->method.len == 0) { | 2910 ngx_conf_merge_str_value(conf->method, prev->method, ""); |
2911 conf->method = prev->method; | 2911 |
2912 | 2912 if (conf->method.len |
2913 } else { | 2913 && conf->method.data[conf->method.len - 1] != ' ') |
2914 { | |
2914 conf->method.data[conf->method.len] = ' '; | 2915 conf->method.data[conf->method.len] = ' '; |
2915 conf->method.len++; | 2916 conf->method.len++; |
2916 } | 2917 } |
2917 | 2918 |
2918 ngx_conf_merge_value(conf->upstream.pass_request_headers, | 2919 ngx_conf_merge_value(conf->upstream.pass_request_headers, |