~ubuntu-branches/debian/squeeze/nginx/squeeze

« back to all changes in this revision

Viewing changes to src/http/modules/ngx_http_proxy_module.c

  • Committer: Bazaar Package Importer
  • Author(s): Kartik Mistry
  • Date: 2010-06-16 01:26:51 UTC
  • mfrom: (1.1.16 upstream)
  • Revision ID: james.westby@ubuntu.com-20100616012651-0kldmspg3i91mynk
Tags: 0.7.67-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
357
357
      0,
358
358
      &ngx_http_proxy_module },
359
359
 
 
360
    { ngx_string("proxy_no_cache"),
 
361
      NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_1MORE,
 
362
      ngx_http_no_cache_set_slot,
 
363
      NGX_HTTP_LOC_CONF_OFFSET,
 
364
      offsetof(ngx_http_proxy_loc_conf_t, upstream.no_cache),
 
365
      NULL },
 
366
 
360
367
    { ngx_string("proxy_cache_valid"),
361
368
      NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_1MORE,
362
369
      ngx_http_file_cache_valid_set_slot,
630
637
    u->process_header = ngx_http_proxy_process_status_line;
631
638
    u->abort_request = ngx_http_proxy_abort_request;
632
639
    u->finalize_request = ngx_http_proxy_finalize_request;
 
640
    r->state = 0;
633
641
 
634
642
    if (plcf->redirects) {
635
643
        u->rewrite_redirect = ngx_http_proxy_rewrite_redirect;
1191
1199
    ctx->status_end = NULL;
1192
1200
 
1193
1201
    r->upstream->process_header = ngx_http_proxy_process_status_line;
 
1202
    r->state = 0;
1194
1203
 
1195
1204
    return NGX_OK;
1196
1205
}
1906
1915
     *     conf->body_set_len = NULL;
1907
1916
     *     conf->body_set = NULL;
1908
1917
     *     conf->body_source = { 0, NULL };
1909
 
     *     conf->rewrite_locations = NULL;
 
1918
     *     conf->redirects = NULL;
1910
1919
     */
1911
1920
 
1912
1921
    conf->upstream.store = NGX_CONF_UNSET;
1931
1940
#if (NGX_HTTP_CACHE)
1932
1941
    conf->upstream.cache = NGX_CONF_UNSET_PTR;
1933
1942
    conf->upstream.cache_min_uses = NGX_CONF_UNSET_UINT;
 
1943
    conf->upstream.no_cache = NGX_CONF_UNSET_PTR;
1934
1944
    conf->upstream.cache_valid = NGX_CONF_UNSET_PTR;
1935
1945
#endif
1936
1946
 
2155
2165
                                         |NGX_HTTP_UPSTREAM_FT_OFF;
2156
2166
    }
2157
2167
 
 
2168
    ngx_conf_merge_ptr_value(conf->upstream.no_cache,
 
2169
                             prev->upstream.no_cache, NULL);
 
2170
 
2158
2171
    ngx_conf_merge_ptr_value(conf->upstream.cache_valid,
2159
2172
                             prev->upstream.cache_valid, NULL);
2160
2173
 
2747
2760
    }
2748
2761
 
2749
2762
    if (ngx_strcmp(value[1].data, "default") == 0) {
 
2763
        if (plcf->proxy_lengths) {
 
2764
            ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
 
2765
                               "\"proxy_redirect default\" may not be used "
 
2766
                               "with \"proxy_pass\" directive with variables");
 
2767
            return NGX_CONF_ERROR;
 
2768
        }
 
2769
 
2750
2770
        if (plcf->url.data == NULL) {
2751
2771
            ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
2752
 
                               "\"proxy_rewrite_location default\" must go "
 
2772
                               "\"proxy_redirect default\" must go "
2753
2773
                               "after the \"proxy_pass\" directive");
2754
2774
            return NGX_CONF_ERROR;
2755
2775
        }