Mercurial > hg > nginx
annotate auto/lib/libxslt/conf @ 7525:575480d3fd01
Perl: propagate errors.
When an error happens, the ctx->error bit is now set, and croak()
is called to terminate further processing. The ctx->error bit is
checked in ngx_http_perl_call_handler() to cancel further processing,
and is also checked in various output functions - to make sure these won't
be called if croak() was handled by an eval{} in perl code.
In particular, this ensures that output chain won't be called after
errors, as filters might not expect this to happen. This fixes some
segmentation faults under low memory conditions. Also this stops
request processing after filter finalization or request body reading
errors.
For cases where an HTTP error status can be additionally returned (for
example, 416 (Requested Range Not Satisfiable) from the range filter),
the ctx->status field is also added.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Fri, 12 Jul 2019 13:56:21 +0300 |
parents | f7e79596baf2 |
children |
rev | line source |
---|---|
2139 | 1 |
2 # Copyright (C) Igor Sysoev | |
4412 | 3 # Copyright (C) Nginx, Inc. |
2139 | 4 |
5 | |
6 ngx_feature="libxslt" | |
7 ngx_feature_name= | |
8 ngx_feature_run=no | |
9 ngx_feature_incs="#include <libxml/parser.h> | |
10 #include <libxml/tree.h> | |
11 #include <libxslt/xslt.h> | |
12 #include <libxslt/xsltInternals.h> | |
13 #include <libxslt/transform.h> | |
14 #include <libxslt/xsltutils.h>" | |
15 ngx_feature_path="/usr/include/libxml2" | |
16 ngx_feature_libs="-lxml2 -lxslt" | |
17 ngx_feature_test="xmlParserCtxtPtr ctxt = NULL; | |
18 xsltStylesheetPtr sheet = NULL; | |
7327
f7e79596baf2
Configure: fixed compiler warnings with "-Wall -Wextra".
Sergey Kandaurov <pluknet@nginx.com>
parents:
6383
diff
changeset
|
19 xmlDocPtr doc = NULL; |
f7e79596baf2
Configure: fixed compiler warnings with "-Wall -Wextra".
Sergey Kandaurov <pluknet@nginx.com>
parents:
6383
diff
changeset
|
20 xmlParseChunk(ctxt, NULL, 0, 0); |
2139 | 21 xsltApplyStylesheet(sheet, doc, NULL);" |
22 . auto/feature | |
23 | |
24 | |
25 if [ $ngx_found = no ]; then | |
26 | |
27 # FreeBSD port | |
28 | |
29 ngx_feature="libxslt in /usr/local/" | |
30 ngx_feature_path="/usr/local/include/libxml2 /usr/local/include" | |
31 | |
32 if [ $NGX_RPATH = YES ]; then | |
33 ngx_feature_libs="-R/usr/local/lib -L/usr/local/lib -lxml2 -lxslt" | |
34 else | |
35 ngx_feature_libs="-L/usr/local/lib -lxml2 -lxslt" | |
36 fi | |
37 | |
38 . auto/feature | |
39 fi | |
40 | |
41 | |
42 if [ $ngx_found = no ]; then | |
43 | |
44 # NetBSD port | |
45 | |
46 ngx_feature="libxslt in /usr/pkg/" | |
47 ngx_feature_path="/usr/pkg/include/libxml2 /usr/pkg/include" | |
48 | |
49 if [ $NGX_RPATH = YES ]; then | |
50 ngx_feature_libs="-R/usr/pkg/lib -L/usr/pkg/lib -lxml2 -lxslt" | |
51 else | |
52 ngx_feature_libs="-L/usr/pkg/lib -lxml2 -lxslt" | |
53 fi | |
54 | |
55 . auto/feature | |
56 fi | |
57 | |
58 | |
59 if [ $ngx_found = no ]; then | |
60 | |
61 # MacPorts | |
62 | |
63 ngx_feature="libxslt in /opt/local/" | |
64 ngx_feature_path="/opt/local/include/libxml2 /opt/local/include" | |
65 | |
66 if [ $NGX_RPATH = YES ]; then | |
67 ngx_feature_libs="-R/opt/local/lib -L/opt/local/lib -lxml2 -lxslt" | |
68 else | |
69 ngx_feature_libs="-L/opt/local/lib -lxml2 -lxslt" | |
70 fi | |
71 | |
72 . auto/feature | |
73 fi | |
74 | |
75 | |
76 if [ $ngx_found = yes ]; then | |
2173 | 77 |
2139 | 78 CORE_INCS="$CORE_INCS $ngx_feature_path" |
6383 | 79 |
80 if [ $USE_LIBXSLT = YES ]; then | |
81 CORE_LIBS="$CORE_LIBS $ngx_feature_libs" | |
82 fi | |
83 | |
84 NGX_LIB_LIBXSLT=$ngx_feature_libs | |
2173 | 85 |
86 else | |
87 | |
88 cat << END | |
89 | |
90 $0: error: the HTTP XSLT module requires the libxml2/libxslt | |
91 libraries. You can either do not enable the module or install the libraries. | |
92 | |
93 END | |
94 | |
95 exit 1 | |
2139 | 96 fi |
2299 | 97 |
98 | |
99 ngx_feature="libexslt" | |
100 ngx_feature_name=NGX_HAVE_EXSLT | |
101 ngx_feature_run=no | |
102 ngx_feature_incs="#include <libexslt/exslt.h>" | |
103 ngx_feature_path="/usr/include/libxml2" | |
104 ngx_feature_libs="-lexslt" | |
105 ngx_feature_test="exsltRegisterAll();" | |
106 . auto/feature | |
107 | |
108 if [ $ngx_found = no ]; then | |
109 | |
110 # FreeBSD port | |
111 | |
112 ngx_feature="libexslt in /usr/local/" | |
113 ngx_feature_path="/usr/local/include/libxml2 /usr/local/include" | |
114 | |
115 if [ $NGX_RPATH = YES ]; then | |
116 ngx_feature_libs="-R/usr/local/lib -L/usr/local/lib -lexslt" | |
117 else | |
118 ngx_feature_libs="-L/usr/local/lib -lexslt" | |
119 fi | |
120 | |
121 . auto/feature | |
122 fi | |
123 | |
124 | |
125 if [ $ngx_found = no ]; then | |
126 | |
127 # NetBSD port | |
128 | |
129 ngx_feature="libexslt in /usr/pkg/" | |
130 ngx_feature_path="/usr/pkg/include/libxml2 /usr/local/include" | |
131 | |
132 if [ $NGX_RPATH = YES ]; then | |
133 ngx_feature_libs="-R/usr/pkg/lib -L/usr/pkg/lib -lexslt" | |
134 else | |
135 ngx_feature_libs="-L/usr/pkg/lib -lexslt" | |
136 fi | |
137 | |
138 . auto/feature | |
139 fi | |
140 | |
141 | |
142 if [ $ngx_found = no ]; then | |
143 | |
144 # MacPorts | |
145 | |
146 ngx_feature="libexslt in /opt/local/" | |
147 ngx_feature_path="/opt/local/include/libxml2 /opt/local/include" | |
148 | |
149 if [ $NGX_RPATH = YES ]; then | |
150 ngx_feature_libs="-R/opt/local/lib -L/opt/local/lib -lexslt" | |
151 else | |
152 ngx_feature_libs="-L/opt/local/lib -lexslt" | |
153 fi | |
154 | |
155 . auto/feature | |
156 fi | |
157 | |
158 | |
159 if [ $ngx_found = yes ]; then | |
6383 | 160 if [ $USE_LIBXSLT = YES ]; then |
161 CORE_LIBS="$CORE_LIBS -lexslt" | |
162 fi | |
163 | |
164 NGX_LIB_LIBXSLT="$NGX_LIB_LIBXSLT -lexslt" | |
2299 | 165 fi |