Mercurial > hg > nginx
annotate auto/lib/openssl/make @ 7355:b64adc956643
Rewrite: removed r->err_status special handling (ticket #1634).
Trying to look into r->err_status in the "return" directive
makes it behave differently than real errors generated in other
parts of the code, and is an endless source of various problems.
This behaviour was introduced in 726:7b71936d5299 (0.4.4) with
the comment "fix: "return" always overrode "error_page" response code".
It is not clear if there were any real cases this was expected to fix,
but there are several cases which are broken due to this change, some
previously fixed (4147:7f64de1cc2c0).
In ticket #1634, the problem is that when r->err_status is set to
a non-special status code, it is not possible to return a response
by simply returning r->err_status. If this is the case, the only
option is to return script's e->status instead. An example
configuration:
location / {
error_page 404 =200 /err502;
return 404;
}
location = /err502 {
return 502;
}
After the change, such a configuration will properly return
standard 502 error, much like it happens when a 502 error is
generated by proxy_pass.
This also fixes the following configuration to properly close
connection as clearly requested by "return 444":
location / {
error_page 404 /close;
return 404;
}
location = /close {
return 444;
}
Previously, this required "error_page 404 = /close;" to work
as intended.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Fri, 21 Sep 2018 15:59:33 +0300 |
parents | b329c0ab1a48 |
children | 3c4d81ea1338 |
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 |
583 | 5 |
2712
41f993457021
OpenSSL building by MSVC and BCC from sources
Igor Sysoev <igor@sysoev.ru>
parents:
1005
diff
changeset
|
6 case "$CC" in |
2846
dfec0e090265
fix building OpenSSL on Win32
Igor Sysoev <igor@sysoev.ru>
parents:
2838
diff
changeset
|
7 |
2712
41f993457021
OpenSSL building by MSVC and BCC from sources
Igor Sysoev <igor@sysoev.ru>
parents:
1005
diff
changeset
|
8 cl) |
2846
dfec0e090265
fix building OpenSSL on Win32
Igor Sysoev <igor@sysoev.ru>
parents:
2838
diff
changeset
|
9 |
2712
41f993457021
OpenSSL building by MSVC and BCC from sources
Igor Sysoev <igor@sysoev.ru>
parents:
1005
diff
changeset
|
10 cat << END >> $NGX_MAKEFILE |
41f993457021
OpenSSL building by MSVC and BCC from sources
Igor Sysoev <igor@sysoev.ru>
parents:
1005
diff
changeset
|
11 |
2846
dfec0e090265
fix building OpenSSL on Win32
Igor Sysoev <igor@sysoev.ru>
parents:
2838
diff
changeset
|
12 $OPENSSL/openssl/include/openssl/ssl.h: $NGX_MAKEFILE |
dfec0e090265
fix building OpenSSL on Win32
Igor Sysoev <igor@sysoev.ru>
parents:
2838
diff
changeset
|
13 \$(MAKE) -f auto/lib/openssl/makefile.msvc \ |
dfec0e090265
fix building OpenSSL on Win32
Igor Sysoev <igor@sysoev.ru>
parents:
2838
diff
changeset
|
14 OPENSSL="$OPENSSL" OPENSSL_OPT="$OPENSSL_OPT" |
2712
41f993457021
OpenSSL building by MSVC and BCC from sources
Igor Sysoev <igor@sysoev.ru>
parents:
1005
diff
changeset
|
15 |
41f993457021
OpenSSL building by MSVC and BCC from sources
Igor Sysoev <igor@sysoev.ru>
parents:
1005
diff
changeset
|
16 END |
41f993457021
OpenSSL building by MSVC and BCC from sources
Igor Sysoev <igor@sysoev.ru>
parents:
1005
diff
changeset
|
17 |
41f993457021
OpenSSL building by MSVC and BCC from sources
Igor Sysoev <igor@sysoev.ru>
parents:
1005
diff
changeset
|
18 ;; |
41f993457021
OpenSSL building by MSVC and BCC from sources
Igor Sysoev <igor@sysoev.ru>
parents:
1005
diff
changeset
|
19 |
2897
d5d3fe7197cc
*) use no-threads for Unix builds only
Igor Sysoev <igor@sysoev.ru>
parents:
2879
diff
changeset
|
20 bcc32) |
2846
dfec0e090265
fix building OpenSSL on Win32
Igor Sysoev <igor@sysoev.ru>
parents:
2838
diff
changeset
|
21 |
dfec0e090265
fix building OpenSSL on Win32
Igor Sysoev <igor@sysoev.ru>
parents:
2838
diff
changeset
|
22 ngx_opt=`echo "-DOPENSSL=\"$OPENSSL\" -DOPENSSL_OPT=\"$OPENSSL_OPT\"" \ |
dfec0e090265
fix building OpenSSL on Win32
Igor Sysoev <igor@sysoev.ru>
parents:
2838
diff
changeset
|
23 | sed -e "s/\//$ngx_regex_dirsep/g"` |
dfec0e090265
fix building OpenSSL on Win32
Igor Sysoev <igor@sysoev.ru>
parents:
2838
diff
changeset
|
24 |
2712
41f993457021
OpenSSL building by MSVC and BCC from sources
Igor Sysoev <igor@sysoev.ru>
parents:
1005
diff
changeset
|
25 cat << END >> $NGX_MAKEFILE |
41f993457021
OpenSSL building by MSVC and BCC from sources
Igor Sysoev <igor@sysoev.ru>
parents:
1005
diff
changeset
|
26 |
2846
dfec0e090265
fix building OpenSSL on Win32
Igor Sysoev <igor@sysoev.ru>
parents:
2838
diff
changeset
|
27 `echo "$OPENSSL\\openssl\\lib\\libeay32.lib: \ |
dfec0e090265
fix building OpenSSL on Win32
Igor Sysoev <igor@sysoev.ru>
parents:
2838
diff
changeset
|
28 $OPENSSL\\openssl\\include\\openssl\\ssl.h" \ |
2712
41f993457021
OpenSSL building by MSVC and BCC from sources
Igor Sysoev <igor@sysoev.ru>
parents:
1005
diff
changeset
|
29 | sed -e "s/\//$ngx_regex_dirsep/g"` |
41f993457021
OpenSSL building by MSVC and BCC from sources
Igor Sysoev <igor@sysoev.ru>
parents:
1005
diff
changeset
|
30 |
2846
dfec0e090265
fix building OpenSSL on Win32
Igor Sysoev <igor@sysoev.ru>
parents:
2838
diff
changeset
|
31 `echo "$OPENSSL\\openssl\\lib\\ssleay32.lib: \ |
dfec0e090265
fix building OpenSSL on Win32
Igor Sysoev <igor@sysoev.ru>
parents:
2838
diff
changeset
|
32 $OPENSSL\\openssl\\include\\openssl\\ssl.h" \ |
dfec0e090265
fix building OpenSSL on Win32
Igor Sysoev <igor@sysoev.ru>
parents:
2838
diff
changeset
|
33 | sed -e "s/\//$ngx_regex_dirsep/g"` |
dfec0e090265
fix building OpenSSL on Win32
Igor Sysoev <igor@sysoev.ru>
parents:
2838
diff
changeset
|
34 |
dfec0e090265
fix building OpenSSL on Win32
Igor Sysoev <igor@sysoev.ru>
parents:
2838
diff
changeset
|
35 `echo "$OPENSSL\\openssl\\include\\openssl\\ssl.h: $NGX_MAKEFILE" \ |
dfec0e090265
fix building OpenSSL on Win32
Igor Sysoev <igor@sysoev.ru>
parents:
2838
diff
changeset
|
36 | sed -e "s/\//$ngx_regex_dirsep/g"` |
dfec0e090265
fix building OpenSSL on Win32
Igor Sysoev <igor@sysoev.ru>
parents:
2838
diff
changeset
|
37 \$(MAKE) -f auto/lib/openssl/makefile.bcc $ngx_opt |
2712
41f993457021
OpenSSL building by MSVC and BCC from sources
Igor Sysoev <igor@sysoev.ru>
parents:
1005
diff
changeset
|
38 |
41f993457021
OpenSSL building by MSVC and BCC from sources
Igor Sysoev <igor@sysoev.ru>
parents:
1005
diff
changeset
|
39 END |
41f993457021
OpenSSL building by MSVC and BCC from sources
Igor Sysoev <igor@sysoev.ru>
parents:
1005
diff
changeset
|
40 |
41f993457021
OpenSSL building by MSVC and BCC from sources
Igor Sysoev <igor@sysoev.ru>
parents:
1005
diff
changeset
|
41 ;; |
41f993457021
OpenSSL building by MSVC and BCC from sources
Igor Sysoev <igor@sysoev.ru>
parents:
1005
diff
changeset
|
42 |
399
4e21d1291a14
nginx-0.0.7-2004-07-25-22:34:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
43 *) |
2897
d5d3fe7197cc
*) use no-threads for Unix builds only
Igor Sysoev <igor@sysoev.ru>
parents:
2879
diff
changeset
|
44 case $OPENSSL in |
3168
83c940b0d18a
allow "make clean" for OpenSSL, the bug was introduced in r2874
Igor Sysoev <igor@sysoev.ru>
parents:
2897
diff
changeset
|
45 /*) ngx_prefix="$OPENSSL/.openssl" ;; |
83c940b0d18a
allow "make clean" for OpenSSL, the bug was introduced in r2874
Igor Sysoev <igor@sysoev.ru>
parents:
2897
diff
changeset
|
46 *) ngx_prefix="$PWD/$OPENSSL/.openssl" ;; |
2879
824d885aa0b1
allow absolute path in --with-openssl=
Igor Sysoev <igor@sysoev.ru>
parents:
2873
diff
changeset
|
47 esac |
824d885aa0b1
allow absolute path in --with-openssl=
Igor Sysoev <igor@sysoev.ru>
parents:
2873
diff
changeset
|
48 |
501 | 49 cat << END >> $NGX_MAKEFILE |
50 | |
3168
83c940b0d18a
allow "make clean" for OpenSSL, the bug was introduced in r2874
Igor Sysoev <igor@sysoev.ru>
parents:
2897
diff
changeset
|
51 $OPENSSL/.openssl/include/openssl/ssl.h: $NGX_MAKEFILE |
501 | 52 cd $OPENSSL \\ |
5438
f817f9d1cded
Configure: call "make clean" for OpenSSL only if Makefile exists.
Piotr Sikora <piotr@cloudflare.com>
parents:
4412
diff
changeset
|
53 && if [ -f Makefile ]; then \$(MAKE) clean; fi \\ |
7247
b329c0ab1a48
Configure: restored "no-threads" in OpenSSL builds.
Maxim Dounin <mdounin@mdounin.ru>
parents:
6404
diff
changeset
|
54 && ./config --prefix=$ngx_prefix no-shared no-threads $OPENSSL_OPT \\ |
2873 | 55 && \$(MAKE) \\ |
6404
09d5a22c76bd
Configure: skip building OpenSSL documentation to conserve time.
Sergey Kandaurov <pluknet@nginx.com>
parents:
6017
diff
changeset
|
56 && \$(MAKE) install_sw LIBDIR=lib |
501 | 57 |
58 END | |
59 | |
399
4e21d1291a14
nginx-0.0.7-2004-07-25-22:34:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
60 ;; |
4e21d1291a14
nginx-0.0.7-2004-07-25-22:34:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
61 |
4e21d1291a14
nginx-0.0.7-2004-07-25-22:34:14 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
62 esac |