Mercurial > hg > nginx
comparison src/http/ngx_http_header_filter_module.c @ 2346:b274942c09c3 stable-0.6
r2052, r2082 merge:
"gzip_vary on" always sends "Vary: Accept-Encoding" header
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 27 Nov 2008 14:12:18 +0000 |
parents | 65cff41e9a4e |
children |
comparison
equal
deleted
inserted
replaced
2345:d8992339584e | 2346:b274942c09c3 |
---|---|
345 | 345 |
346 } else { | 346 } else { |
347 len += sizeof("Connection: closed" CRLF) - 1; | 347 len += sizeof("Connection: closed" CRLF) - 1; |
348 } | 348 } |
349 | 349 |
350 #if (NGX_HTTP_GZIP) | |
351 if (r->gzip && clcf->gzip_vary) { | |
352 len += sizeof("Vary: Accept-Encoding" CRLF) - 1; | |
353 } | |
354 #endif | |
355 | |
350 part = &r->headers_out.headers.part; | 356 part = &r->headers_out.headers.part; |
351 header = part->elts; | 357 header = part->elts; |
352 | 358 |
353 for (i = 0; /* void */; i++) { | 359 for (i = 0; /* void */; i++) { |
354 | 360 |
514 } else { | 520 } else { |
515 b->last = ngx_cpymem(b->last, "Connection: close" CRLF, | 521 b->last = ngx_cpymem(b->last, "Connection: close" CRLF, |
516 sizeof("Connection: close" CRLF) - 1); | 522 sizeof("Connection: close" CRLF) - 1); |
517 } | 523 } |
518 | 524 |
525 #if (NGX_HTTP_GZIP) | |
526 if (r->gzip && clcf->gzip_vary) { | |
527 b->last = ngx_cpymem(b->last, "Vary: Accept-Encoding" CRLF, | |
528 sizeof("Vary: Accept-Encoding" CRLF) - 1); | |
529 } | |
530 #endif | |
531 | |
519 part = &r->headers_out.headers.part; | 532 part = &r->headers_out.headers.part; |
520 header = part->elts; | 533 header = part->elts; |
521 | 534 |
522 for (i = 0; /* void */; i++) { | 535 for (i = 0; /* void */; i++) { |
523 | 536 |