Changeset 6781:ca27074f8f0f in nginx


Ignore:
Timestamp:
10/16/16 15:24:01 (3 years ago)
Author:
Dmitry Lazurkin <dilaz03@…>
Branch:
default
Phase:
public
Message:

Proxy: support variables for proxy_method directive.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/http/modules/ngx_http_proxy_module.c

    r6747 r6781  
    7474    ngx_array_t                   *cookie_paths;
    7575
    76     ngx_str_t                      method;
     76    ngx_http_complex_value_t      *method;
    7777    ngx_str_t                      location;
    7878    ngx_str_t                      url;
     
    381381    { ngx_string("proxy_method"),
    382382      NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
    383       ngx_conf_set_str_slot,
     383      ngx_http_set_complex_value_slot,
    384384      NGX_HTTP_LOC_CONF_OFFSET,
    385385      offsetof(ngx_http_proxy_loc_conf_t, method),
     
    11601160        method = u->method;
    11611161
    1162     } else if (plcf->method.len) {
    1163         method = plcf->method;
     1162    } else if (plcf->method) {
     1163        if (ngx_http_complex_value(r, plcf->method, &method) != NGX_OK) {
     1164            return NGX_ERROR;
     1165        }
    11641166
    11651167    } else {
     
    27982800     *     conf->upstream.ssl_name = NULL;
    27992801     *
    2800      *     conf->method = { 0, NULL };
     2802     *     conf->method = NULL;
    28012803     *     conf->headers_source = NULL;
    28022804     *     conf->headers.lengths = NULL;
     
    31593161#endif
    31603162
    3161     ngx_conf_merge_str_value(conf->method, prev->method, "");
     3163    if (conf->method == NULL) {
     3164        conf->method = prev->method;
     3165    }
    31623166
    31633167    ngx_conf_merge_value(conf->upstream.pass_request_headers,
Note: See TracChangeset for help on using the changeset viewer.