comparison src/http/ngx_http_upstream.c @ 8040:e0cfab501dd1

Upstream: fixed build without http cache (broken by cd73509f21e2).
author Maxim Dounin <mdounin@mdounin.ru>
date Tue, 31 May 2022 00:14:11 +0300
parents f739c8142fb2
children 0784ab86ad08
comparison
equal deleted inserted replaced
8039:e64a1f32065b 8040:e0cfab501dd1
5181 5181
5182 static ngx_int_t 5182 static ngx_int_t
5183 ngx_http_upstream_process_vary(ngx_http_request_t *r, 5183 ngx_http_upstream_process_vary(ngx_http_request_t *r,
5184 ngx_table_elt_t *h, ngx_uint_t offset) 5184 ngx_table_elt_t *h, ngx_uint_t offset)
5185 { 5185 {
5186 u_char *p;
5187 size_t len;
5188 ngx_str_t vary;
5189 ngx_table_elt_t **ph; 5186 ngx_table_elt_t **ph;
5190 ngx_http_upstream_t *u; 5187 ngx_http_upstream_t *u;
5191 5188
5192 u = r->upstream; 5189 u = r->upstream;
5193 ph = &u->headers_in.vary; 5190 ph = &u->headers_in.vary;
5196 5193
5197 *ph = h; 5194 *ph = h;
5198 h->next = NULL; 5195 h->next = NULL;
5199 5196
5200 #if (NGX_HTTP_CACHE) 5197 #if (NGX_HTTP_CACHE)
5198 {
5199 u_char *p;
5200 size_t len;
5201 ngx_str_t vary;
5201 5202
5202 if (u->conf->ignore_headers & NGX_HTTP_UPSTREAM_IGN_VARY) { 5203 if (u->conf->ignore_headers & NGX_HTTP_UPSTREAM_IGN_VARY) {
5203 return NGX_OK; 5204 return NGX_OK;
5204 } 5205 }
5205 5206
5247 if (vary.len > NGX_HTTP_CACHE_VARY_LEN) { 5248 if (vary.len > NGX_HTTP_CACHE_VARY_LEN) {
5248 u->cacheable = 0; 5249 u->cacheable = 0;
5249 } 5250 }
5250 5251
5251 r->cache->vary = vary; 5252 r->cache->vary = vary;
5252 5253 }
5253 #endif 5254 #endif
5254 5255
5255 return NGX_OK; 5256 return NGX_OK;
5256 } 5257 }
5257 5258