[nginx] svn commit: r5061 - in branches/stable-1.2: . src/http/modules
mdounin at mdounin.ru
mdounin at mdounin.ru
Mon Feb 11 15:31:10 UTC 2013
Author: mdounin
Date: 2013-02-11 15:31:10 +0000 (Mon, 11 Feb 2013)
New Revision: 5061
URL: http://trac.nginx.org/nginx/changeset/5061/nginx
Log:
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.
Modified:
branches/stable-1.2/
branches/stable-1.2/src/http/modules/ngx_http_proxy_module.c
Index: branches/stable-1.2
===================================================================
--- branches/stable-1.2 2013-02-11 15:28:50 UTC (rev 5060)
+++ branches/stable-1.2 2013-02-11 15:31:10 UTC (rev 5061)
Property changes on: branches/stable-1.2
___________________________________________________________________
Modified: svn:mergeinfo
## -1 +1 ##
-/trunk:4611-4632,4636-4657,4671-4672,4674-4676,4682,4684-4699,4704-4706,4713,4736-4741,4754,4756-4771,4775,4777-4780,4782-4785,4795,4811-4820,4822-4824,4828-4835,4840-4844,4865-4872,4885-4887,4890-4896,4913-4925,4933-4934,4939,4944-4949,4961-4969,4973-4974,4976-4994,4997,4999-5004,5011-5012,5019-5025
+/trunk:4611-4632,4636-4657,4671-4672,4674-4676,4682,4684-4699,4704-4706,4713,4736-4741,4754,4756-4771,4775,4777-4780,4782-4785,4795,4811-4820,4822-4824,4828-4835,4840-4844,4865-4872,4885-4887,4890-4896,4913-4925,4933-4934,4939,4944-4949,4961-4969,4973-4974,4976-4994,4997,4999-5004,5011-5013,5019-5025
\ No newline at end of property
Modified: branches/stable-1.2/src/http/modules/ngx_http_proxy_module.c
===================================================================
--- branches/stable-1.2/src/http/modules/ngx_http_proxy_module.c 2013-02-11 15:28:50 UTC (rev 5060)
+++ branches/stable-1.2/src/http/modules/ngx_http_proxy_module.c 2013-02-11 15:31:10 UTC (rev 5061)
@@ -2608,7 +2608,7 @@
* conf->upstream.store_lengths = NULL;
* conf->upstream.store_values = NULL;
*
- * conf->method = NULL;
+ * conf->method = { 0, NULL };
* conf->headers_source = NULL;
* conf->headers_set_len = NULL;
* conf->headers_set = NULL;
@@ -2907,10 +2907,11 @@
#endif
- if (conf->method.len == 0) {
- conf->method = prev->method;
+ ngx_conf_merge_str_value(conf->method, prev->method, "");
- } else {
+ if (conf->method.len
+ && conf->method.data[conf->method.len - 1] != ' ')
+ {
conf->method.data[conf->method.len] = ' ';
conf->method.len++;
}
More information about the nginx-devel
mailing list