Mercurial > hg > nginx-quic
annotate auto/cc/name @ 6428:545b5e4d83b2
Upstream: avoid closing client connection in edge case.
If proxy_cache is enabled, and proxy_no_cache tests true, it was previously
possible for the client connection to be closed after a 304. The fix is to
recheck r->header_only after the final cacheability is determined, and end the
request if no longer cacheable.
Example configuration:
proxy_cache foo;
proxy_cache_bypass 1;
proxy_no_cache 1;
If a client sends If-None-Match, and the upstream server returns 200 with a
matching ETag, no body should be returned to the client. At the start of
ngx_http_upstream_send_response proxy_no_cache is not yet tested, thus cacheable
is still 1 and downstream_error is set.
However, by the time the downstream_error check is done in process_request,
proxy_no_cache has been tested and cacheable is set to 0. The client connection
is then closed, regardless of keepalive.
author | Justin Li <jli.justinli@gmail.com> |
---|---|
date | Tue, 08 Mar 2016 22:31:55 -0500 |
parents | 78f8ac479735 |
children | 325b3042edd6 |
rev | line source |
---|---|
455 | 1 |
2 # Copyright (C) Igor Sysoev | |
4412 | 3 # Copyright (C) Nginx, Inc. |
455 | 4 |
5 | |
946 | 6 if [ "$NGX_PLATFORM" != win32 ]; then |
7 | |
8 ngx_feature="C compiler" | |
9 ngx_feature_name= | |
10 ngx_feature_run=yes | |
11 ngx_feature_incs= | |
12 ngx_feature_path= | |
13 ngx_feature_libs= | |
14 ngx_feature_test= | |
15 . auto/feature | |
16 | |
17 if [ $ngx_found = no ]; then | |
18 echo | |
19 echo $0: error: C compiler $CC is not found | |
20 echo | |
21 exit 1 | |
22 fi | |
23 | |
24 fi | |
455 | 25 |
26 | |
577 | 27 if [ "$CC" = cl ]; then |
6397
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
5187
diff
changeset
|
28 NGX_CC_NAME=msvc |
78f8ac479735
Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents:
5187
diff
changeset
|
29 echo " + using Microsoft Visual C++ compiler" |
455 | 30 |
4758
1f908d2dde8d
Replaced a number of "else if" with "elif".
Ruslan Ermilov <ru@nginx.com>
parents:
4492
diff
changeset
|
31 elif [ "$CC" = wcl386 ]; then |
455 | 32 NGX_CC_NAME=owc |
946 | 33 echo " + using Open Watcom C compiler" |
455 | 34 |
4758
1f908d2dde8d
Replaced a number of "else if" with "elif".
Ruslan Ermilov <ru@nginx.com>
parents:
4492
diff
changeset
|
35 elif [ "$CC" = bcc32 ]; then |
455 | 36 NGX_CC_NAME=bcc |
946 | 37 echo " + using Borland C++ compiler" |
455 | 38 |
4758
1f908d2dde8d
Replaced a number of "else if" with "elif".
Ruslan Ermilov <ru@nginx.com>
parents:
4492
diff
changeset
|
39 elif `$CC -V 2>&1 | grep '^Intel(R) C' >/dev/null 2>&1`; then |
4492
4871a7dc12a9
Configure: moved icc detection before gcc.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4412
diff
changeset
|
40 NGX_CC_NAME=icc |
4871a7dc12a9
Configure: moved icc detection before gcc.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4412
diff
changeset
|
41 echo " + using Intel C++ compiler" |
4871a7dc12a9
Configure: moved icc detection before gcc.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4412
diff
changeset
|
42 |
4758
1f908d2dde8d
Replaced a number of "else if" with "elif".
Ruslan Ermilov <ru@nginx.com>
parents:
4492
diff
changeset
|
43 elif `$CC -v 2>&1 | grep 'gcc version' >/dev/null 2>&1`; then |
455 | 44 NGX_CC_NAME=gcc |
946 | 45 echo " + using GNU C compiler" |
455 | 46 |
5187
f1daa0356a1d
Configure: fixed detection of newer Apple clang compilers.
Ruslan Ermilov <ru@nginx.com>
parents:
4762
diff
changeset
|
47 elif `$CC -v 2>&1 | grep '\(clang\|LLVM\) version' >/dev/null 2>&1`; then |
4762
182aee3b1bf5
Added the Clang compiler support.
Ruslan Ermilov <ru@nginx.com>
parents:
4758
diff
changeset
|
48 NGX_CC_NAME=clang |
182aee3b1bf5
Added the Clang compiler support.
Ruslan Ermilov <ru@nginx.com>
parents:
4758
diff
changeset
|
49 echo " + using Clang C compiler" |
182aee3b1bf5
Added the Clang compiler support.
Ruslan Ermilov <ru@nginx.com>
parents:
4758
diff
changeset
|
50 |
4758
1f908d2dde8d
Replaced a number of "else if" with "elif".
Ruslan Ermilov <ru@nginx.com>
parents:
4492
diff
changeset
|
51 elif `$CC -V 2>&1 | grep 'Sun C' >/dev/null 2>&1`; then |
561 | 52 NGX_CC_NAME=sunc |
946 | 53 echo " + using Sun C compiler" |
561 | 54 |
4758
1f908d2dde8d
Replaced a number of "else if" with "elif".
Ruslan Ermilov <ru@nginx.com>
parents:
4492
diff
changeset
|
55 elif `$CC -V 2>&1 | grep '^Compaq C' >/dev/null 2>&1`; then |
455 | 56 NGX_CC_NAME=ccc |
946 | 57 echo " + using Compaq C compiler" |
455 | 58 |
4758
1f908d2dde8d
Replaced a number of "else if" with "elif".
Ruslan Ermilov <ru@nginx.com>
parents:
4492
diff
changeset
|
59 elif `$CC -V 2>&1 | grep '^aCC: ' >/dev/null 2>&1`; then |
455 | 60 NGX_CC_NAME=acc |
946 | 61 echo " + using HP aC++ compiler" |
455 | 62 |
63 else | |
517 | 64 NGX_CC_NAME=unknown |
455 | 65 |
4758
1f908d2dde8d
Replaced a number of "else if" with "elif".
Ruslan Ermilov <ru@nginx.com>
parents:
4492
diff
changeset
|
66 fi |