Mercurial > hg > nginx-quic
comparison src/http/modules/ngx_http_proxy_module.c @ 5012:bbdb172f0927
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 | Tue, 22 Jan 2013 12:36:00 +0000 |
parents | fd84344f1df7 |
children | 7fa7e60a7f66 |
comparison
equal
deleted
inserted
replaced
5011:2b71f6535c76 | 5012:bbdb172f0927 |
---|---|
2351 * conf->upstream.uri = { 0, NULL }; | 2351 * conf->upstream.uri = { 0, NULL }; |
2352 * conf->upstream.location = NULL; | 2352 * conf->upstream.location = NULL; |
2353 * conf->upstream.store_lengths = NULL; | 2353 * conf->upstream.store_lengths = NULL; |
2354 * conf->upstream.store_values = NULL; | 2354 * conf->upstream.store_values = NULL; |
2355 * | 2355 * |
2356 * conf->method = NULL; | 2356 * conf->method = { 0, NULL }; |
2357 * conf->headers_source = NULL; | 2357 * conf->headers_source = NULL; |
2358 * conf->headers_set_len = NULL; | 2358 * conf->headers_set_len = NULL; |
2359 * conf->headers_set = NULL; | 2359 * conf->headers_set = NULL; |
2360 * conf->headers_set_hash = NULL; | 2360 * conf->headers_set_hash = NULL; |
2361 * conf->body_set_len = NULL; | 2361 * conf->body_set_len = NULL; |
2655 ngx_conf_merge_msec_value(conf->upstream.cache_lock_timeout, | 2655 ngx_conf_merge_msec_value(conf->upstream.cache_lock_timeout, |
2656 prev->upstream.cache_lock_timeout, 5000); | 2656 prev->upstream.cache_lock_timeout, 5000); |
2657 | 2657 |
2658 #endif | 2658 #endif |
2659 | 2659 |
2660 if (conf->method.len == 0) { | 2660 ngx_conf_merge_str_value(conf->method, prev->method, ""); |
2661 conf->method = prev->method; | 2661 |
2662 | 2662 if (conf->method.len |
2663 } else { | 2663 && conf->method.data[conf->method.len - 1] != ' ') |
2664 { | |
2664 conf->method.data[conf->method.len] = ' '; | 2665 conf->method.data[conf->method.len] = ' '; |
2665 conf->method.len++; | 2666 conf->method.len++; |
2666 } | 2667 } |
2667 | 2668 |
2668 ngx_conf_merge_value(conf->upstream.pass_request_headers, | 2669 ngx_conf_merge_value(conf->upstream.pass_request_headers, |