A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/openresty/srcache-nginx-module/commit/be22ac0dcd9245aadcaca3220da96a0c1a0285a7 below:

Update handling of cache_control changed in nginx 1.23.0 (Fix… · openresty/srcache-nginx-module@be22ac0 · GitHub

File tree Expand file treeCollapse file tree 3 files changed

+34

-1

lines changed

Filter options

Expand file treeCollapse file tree 3 files changed

+34

-1

lines changed Original file line number Diff line number Diff line change

@@ -25,6 +25,7 @@ env:

25 25

matrix:

26 26

- NGINX_VERSION=1.17.8

27 27

- NGINX_VERSION=1.19.9

28 +

- NGINX_VERSION=1.23.0

28 29 29 30

services:

30 31

- memcache

Original file line number Diff line number Diff line change

@@ -256,9 +256,17 @@ static ngx_int_t

256 256

ngx_http_srcache_process_multi_header_lines(ngx_http_request_t *r,

257 257

ngx_table_elt_t *h, ngx_uint_t offset)

258 258

{

259 +

#if defined(nginx_version) && nginx_version < 1023000

259 260

ngx_array_t *pa;

261 +

#endif

260 262

ngx_table_elt_t *ho, **ph;

261 263 264 +

#if defined(nginx_version) && nginx_version >= 1023000

265 +

ph = (ngx_table_elt_t **) ((char *) &r->headers_out + offset);

266 +

while (*ph) {

267 +

ph = &(*ph)->next;

268 +

}

269 +

#else

262 270

pa = (ngx_array_t *) ((char *) &r->headers_out + offset);

263 271 264 272

if (pa->elts == NULL) {

@@ -272,6 +280,7 @@ ngx_http_srcache_process_multi_header_lines(ngx_http_request_t *r,

272 280

if (ph == NULL) {

273 281

return NGX_ERROR;

274 282

}

283 +

#endif

275 284 276 285

ho = ngx_list_push(&r->headers_out.headers);

277 286

if (ho == NULL) {

@@ -280,6 +289,9 @@ ngx_http_srcache_process_multi_header_lines(ngx_http_request_t *r,

280 289 281 290

*ho = *h;

282 291

*ph = ho;

292 +

#if defined(nginx_version) && nginx_version >= 1023000

293 +

ho->next = NULL;

294 +

#endif

283 295 284 296

return NGX_OK;

285 297

}

Original file line number Diff line number Diff line change

@@ -546,15 +546,34 @@ ngx_int_t

546 546

ngx_http_srcache_response_no_cache(ngx_http_request_t *r,

547 547

ngx_http_srcache_loc_conf_t *conf, ngx_http_srcache_ctx_t *ctx)

548 548

{

549 -

ngx_table_elt_t **ccp;

550 549

ngx_table_elt_t *h;

550 +

#if defined(nginx_version) && nginx_version >= 1023000

551 +

ngx_table_elt_t *cc;

552 +

#else

553 +

ngx_table_elt_t **ccp;

551 554

ngx_uint_t i;

555 +

#endif

552 556

u_char *p, *last;

553 557

ngx_int_t n;

554 558

time_t expires;

555 559 556 560

dd("checking response cache control settings");

557 561 562 +

#if defined(nginx_version) && nginx_version >= 1023000

563 +

cc = r->headers_out.cache_control;

564 + 565 +

if (cc == NULL) {

566 +

goto check_expires;

567 +

}

568 + 569 +

for (; cc; cc = cc->next) {

570 +

if (!cc->hash) {

571 +

continue;

572 +

}

573 + 574 +

p = cc->value.data;

575 +

last = p + cc->value.len;

576 +

#else

558 577

ccp = r->headers_out.cache_control.elts;

559 578 560 579

if (ccp == NULL) {

@@ -568,6 +587,7 @@ ngx_http_srcache_response_no_cache(ngx_http_request_t *r,

568 587 569 588

p = ccp[i]->value.data;

570 589

last = p + ccp[i]->value.len;

590 +

#endif

571 591 572 592

if (!conf->store_private

573 593

&& ngx_strlcasestrn(p, last, (u_char *) "private", 7 - 1) != NULL)

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4