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.
Maxim Dounin
9 years ago
2607 | 2607 | * conf->upstream.store_lengths = NULL; |
2608 | 2608 | * conf->upstream.store_values = NULL; |
2609 | 2609 | * |
2610 | * conf->method = NULL; | |
2610 | * conf->method = { 0, NULL }; | |
2611 | 2611 | * conf->headers_source = NULL; |
2612 | 2612 | * conf->headers_set_len = NULL; |
2613 | 2613 | * conf->headers_set = NULL; |
2906 | 2906 | |
2907 | 2907 | #endif |
2908 | 2908 | |
2909 | if (conf->method.len == 0) { | |
2910 | conf->method = prev->method; | |
2911 | ||
2912 | } else { | |
2909 | ngx_conf_merge_str_value(conf->method, prev->method, ""); | |
2910 | ||
2911 | if (conf->method.len | |
2912 | && conf->method.data[conf->method.len - 1] != ' ') | |
2913 | { | |
2913 | 2914 | conf->method.data[conf->method.len] = ' '; |
2914 | 2915 | conf->method.len++; |
2915 | 2916 | } |