Mercurial > hg > nginx-quic
annotate auto/lib/conf @ 8047:7015f26aef90
Cache: ignore stale-if-error for 4xx and 5xx codes.
Previously the stale-if-error extension of the Cache-Control upstream header
triggered the return of a stale response for all error conditions that can be
specified in the proxy_cache_use_stale directive. The list of these errors
includes both network/timeout/format errors, as well as some HTTP codes like
503, 504, 403, 429 etc. The latter prevented a cache entry from being updated
by a response with any of these HTTP codes during the stale-if-error period.
Now stale-if-error only works for network/timeout/format errors and ignores
the upstream HTTP code. The return of a stale response for certain HTTP codes
is still possible using the proxy_cache_use_stale directive.
This change also applies to the stale-while-revalidate extension of the
Cache-Control header, which triggers stale-if-error if it is missing.
Reported at
http://mailman.nginx.org/pipermail/nginx/2020-July/059723.html.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Wed, 29 Jul 2020 13:28:04 +0300 |
parents | cc7ff76df927 |
children |
rev | line source |
---|---|
444
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
399
diff
changeset
|
1 |
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
399
diff
changeset
|
2 # Copyright (C) Igor Sysoev |
4412 | 3 # Copyright (C) Nginx, Inc. |
444
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
399
diff
changeset
|
4 |
210
00cafae0bdf1
nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
5 |
481 | 6 if [ $USE_PCRE = YES -o $PCRE != NONE ]; then |
255
e6938ca7331a
nginx-0.0.2-2004-02-09-23:47:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
212
diff
changeset
|
7 . auto/lib/pcre/conf |
2893
da1ba8a5c8c9
stop ./configure at once on library failure
Igor Sysoev <igor@sysoev.ru>
parents:
2892
diff
changeset
|
8 |
da1ba8a5c8c9
stop ./configure at once on library failure
Igor Sysoev <igor@sysoev.ru>
parents:
2892
diff
changeset
|
9 else |
7068
cc7ff76df927
Configure: fixed PCRE requirement check by ngx_http_rewrite_module.
Samuel Martin <s.martin49@gmail.com>
parents:
6603
diff
changeset
|
10 if [ $USE_PCRE = DISABLED -a $HTTP = YES -a $HTTP_REWRITE = YES ]; then |
2893
da1ba8a5c8c9
stop ./configure at once on library failure
Igor Sysoev <igor@sysoev.ru>
parents:
2892
diff
changeset
|
11 |
da1ba8a5c8c9
stop ./configure at once on library failure
Igor Sysoev <igor@sysoev.ru>
parents:
2892
diff
changeset
|
12 cat << END |
da1ba8a5c8c9
stop ./configure at once on library failure
Igor Sysoev <igor@sysoev.ru>
parents:
2892
diff
changeset
|
13 |
da1ba8a5c8c9
stop ./configure at once on library failure
Igor Sysoev <igor@sysoev.ru>
parents:
2892
diff
changeset
|
14 $0: error: the HTTP rewrite module requires the PCRE library. |
da1ba8a5c8c9
stop ./configure at once on library failure
Igor Sysoev <igor@sysoev.ru>
parents:
2892
diff
changeset
|
15 You can either disable the module by using --without-http_rewrite_module |
da1ba8a5c8c9
stop ./configure at once on library failure
Igor Sysoev <igor@sysoev.ru>
parents:
2892
diff
changeset
|
16 option or you have to enable the PCRE support. |
da1ba8a5c8c9
stop ./configure at once on library failure
Igor Sysoev <igor@sysoev.ru>
parents:
2892
diff
changeset
|
17 |
da1ba8a5c8c9
stop ./configure at once on library failure
Igor Sysoev <igor@sysoev.ru>
parents:
2892
diff
changeset
|
18 END |
da1ba8a5c8c9
stop ./configure at once on library failure
Igor Sysoev <igor@sysoev.ru>
parents:
2892
diff
changeset
|
19 exit 1 |
da1ba8a5c8c9
stop ./configure at once on library failure
Igor Sysoev <igor@sysoev.ru>
parents:
2892
diff
changeset
|
20 fi |
210
00cafae0bdf1
nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
21 fi |
00cafae0bdf1
nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
22 |
2893
da1ba8a5c8c9
stop ./configure at once on library failure
Igor Sysoev <igor@sysoev.ru>
parents:
2892
diff
changeset
|
23 |
477 | 24 if [ $USE_OPENSSL = YES ]; then |
25 . auto/lib/openssl/conf | |
210
00cafae0bdf1
nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
26 fi |
00cafae0bdf1
nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
27 |
00cafae0bdf1
nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
28 if [ $USE_ZLIB = YES ]; then |
00cafae0bdf1
nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
29 . auto/lib/zlib/conf |
00cafae0bdf1
nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
30 fi |
599 | 31 |
6383 | 32 if [ $USE_LIBXSLT != NO ]; then |
2139 | 33 . auto/lib/libxslt/conf |
34 fi | |
35 | |
6383 | 36 if [ $USE_LIBGD != NO ]; then |
2788 | 37 . auto/lib/libgd/conf |
38 fi | |
39 | |
6419 | 40 if [ $USE_PERL != NO ]; then |
599 | 41 . auto/lib/perl/conf |
42 fi | |
1949 | 43 |
6383 | 44 if [ $USE_GEOIP != NO ]; then |
2985 | 45 . auto/lib/geoip/conf |
46 fi | |
3363 | 47 |
1949 | 48 if [ $NGX_GOOGLE_PERFTOOLS = YES ]; then |
49 . auto/lib/google-perftools/conf | |
50 fi | |
3363 | 51 |
52 if [ $NGX_LIBATOMIC != NO ]; then | |
53 . auto/lib/libatomic/conf | |
54 fi |