Ticket #645: nginx-proxy.patch

File nginx-proxy.patch, 1.3 KB (added by Alexey Radkov, 12 years ago)
  • src/http/modules/ngx_http_proxy_module.c

    diff -ur nginx-1.7.6/src/http/modules/ngx_http_proxy_module.c nginx-1.7.6.new/src/http/modules/ngx_http_proxy_module.c
    old new  
    28762876    ngx_conf_merge_ptr_value(conf->cookie_paths, prev->cookie_paths, NULL);
    28772877
    28782878#if (NGX_HTTP_SSL)
    2879     if (conf->upstream.ssl == NULL) {
     2879    if (conf->upstream.ssl == NULL && conf->upstream.upstream == NULL) {
    28802880        conf->upstream.ssl = prev->upstream.ssl;
    28812881    }
    28822882#endif
     
    29052905    }
    29062906
    29072907    if (conf->upstream.upstream == NULL) {
     2908        if (conf->proxy_lengths == NULL) {
     2909            conf->proxy_lengths = prev->proxy_lengths;
     2910            conf->proxy_values = prev->proxy_values;
     2911        }
    29082912        conf->upstream.upstream = prev->upstream.upstream;
    29092913        conf->vars = prev->vars;
    29102914    }
    29112915
    2912     if (conf->proxy_lengths == NULL) {
    2913         conf->proxy_lengths = prev->proxy_lengths;
    2914         conf->proxy_values = prev->proxy_values;
    2915     }
    2916 
    29172916    if (conf->upstream.upstream || conf->proxy_lengths) {
    29182917        clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module);
    29192918        if (clcf->handler == NULL && clcf->lmt_excpt) {