Mercurial > hg > nginx
annotate auto/lib/pcre/make @ 9275:199dc0d6b05b
Added max_headers directive.
The directive limits the number of request headers accepted from clients.
While the total amount of headers is believed to be sufficiently limited
by the existing buffer size limits (client_header_buffer_size and
large_client_header_buffers), the additional limit on the number of headers
might be beneficial to better protect backend servers.
Requested by Maksim Yevmenkin.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Fri, 24 May 2024 00:20:01 +0300 |
parents | 0b5f12d5c531 |
children | 8149e6e3ea2a |
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:
297
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:
297
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:
297
diff
changeset
|
4 |
274
a1ea1ecc3eac
nginx-0.0.2-2004-03-01-23:00:04 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
5 |
7981 | 6 if [ $PCRE_LIBRARY = PCRE2 ]; then |
7 | |
8 # PCRE2 | |
9 | |
10 if [ $NGX_CC_NAME = msvc ]; then | |
11 | |
12 # With PCRE2, it is not possible to compile all sources. | |
13 # Since list of source files changes between versions, we | |
14 # test files which might not be present. | |
282
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
274
diff
changeset
|
15 |
7981 | 16 ngx_pcre_srcs="pcre2_auto_possess.c \ |
17 pcre2_chartables.c \ | |
18 pcre2_compile.c \ | |
19 pcre2_config.c \ | |
20 pcre2_context.c \ | |
21 pcre2_dfa_match.c \ | |
22 pcre2_error.c \ | |
23 pcre2_jit_compile.c \ | |
24 pcre2_maketables.c \ | |
25 pcre2_match.c \ | |
26 pcre2_match_data.c \ | |
27 pcre2_newline.c \ | |
28 pcre2_ord2utf.c \ | |
29 pcre2_pattern_info.c \ | |
30 pcre2_string_utils.c \ | |
31 pcre2_study.c \ | |
32 pcre2_substitute.c \ | |
33 pcre2_substring.c \ | |
34 pcre2_tables.c \ | |
35 pcre2_ucd.c \ | |
36 pcre2_valid_utf.c \ | |
37 pcre2_xclass.c" | |
38 | |
39 ngx_pcre_test="pcre2_convert.c \ | |
40 pcre2_extuni.c \ | |
41 pcre2_find_bracket.c \ | |
42 pcre2_script_run.c \ | |
43 pcre2_serialize.c" | |
44 | |
45 for ngx_src in $ngx_pcre_test | |
46 do | |
47 if [ -f $PCRE/src/$ngx_src ]; then | |
48 ngx_pcre_srcs="$ngx_pcre_srcs $ngx_src" | |
49 fi | |
50 done | |
282
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
274
diff
changeset
|
51 |
7981 | 52 ngx_pcre_objs=`echo $ngx_pcre_srcs \ |
53 | sed -e "s#\([^ ]*\.\)c#\1$ngx_objext#g"` | |
54 | |
55 ngx_pcre_srcs=`echo $ngx_pcre_srcs \ | |
56 | sed -e "s/ *\([^ ][^ ]*\)/$ngx_regex_cont\1/g"` | |
57 ngx_pcre_objs=`echo $ngx_pcre_objs \ | |
58 | sed -e "s/ *\([^ ][^ ]*\)/$ngx_regex_cont\1/g"` | |
59 | |
60 cat << END >> $NGX_MAKEFILE | |
61 | |
62 PCRE_CFLAGS = -O2 -Ob1 -Oi -Gs $LIBC $CPU_OPT | |
63 PCRE_FLAGS = -DHAVE_CONFIG_H -DPCRE2_STATIC -DPCRE2_CODE_UNIT_WIDTH=8 \\ | |
64 -DHAVE_MEMMOVE | |
65 | |
66 PCRE_SRCS = $ngx_pcre_srcs | |
67 PCRE_OBJS = $ngx_pcre_objs | |
68 | |
69 $PCRE/src/pcre2.h: | |
70 cd $PCRE/src \\ | |
71 && copy /y config.h.generic config.h \\ | |
72 && copy /y pcre2.h.generic pcre2.h \\ | |
73 && copy /y pcre2_chartables.c.dist pcre2_chartables.c | |
297
ee394e997c77
nginx-0.0.3-2004-03-29-21:43:58 import
Igor Sysoev <igor@sysoev.ru>
parents:
295
diff
changeset
|
74 |
7981 | 75 $PCRE/src/pcre2-8.lib: $PCRE/src/pcre2.h $NGX_MAKEFILE |
76 cd $PCRE/src \\ | |
77 && cl -nologo -c \$(PCRE_CFLAGS) -I . \$(PCRE_FLAGS) \$(PCRE_SRCS) \\ | |
78 && link -lib -out:pcre2-8.lib -verbose:lib \$(PCRE_OBJS) | |
79 | |
80 END | |
81 | |
82 else | |
83 | |
84 cat << END >> $NGX_MAKEFILE | |
85 | |
86 $PCRE/src/pcre2.h: $PCRE/Makefile | |
282
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
274
diff
changeset
|
87 |
7981 | 88 $PCRE/Makefile: $NGX_MAKEFILE |
89 cd $PCRE \\ | |
90 && if [ -f Makefile ]; then \$(MAKE) distclean; fi \\ | |
91 && CC="\$(CC)" CFLAGS="$PCRE_OPT" \\ | |
92 ./configure --disable-shared $PCRE_CONF_OPT | |
5360
3d2d3e1cf427
Win32: MinGW GCC compatibility.
Maxim Dounin <mdounin@mdounin.ru>
parents:
5342
diff
changeset
|
93 |
7981 | 94 $PCRE/.libs/libpcre2-8.a: $PCRE/Makefile |
95 cd $PCRE \\ | |
96 && \$(MAKE) libpcre2-8.la | |
97 | |
98 END | |
99 | |
100 fi | |
282
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
274
diff
changeset
|
101 |
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
274
diff
changeset
|
102 |
7981 | 103 else |
104 | |
105 # PCRE | |
106 | |
107 case "$NGX_CC_NAME" in | |
108 | |
109 msvc) | |
110 ngx_makefile=makefile.msvc | |
111 ngx_opt="CPU_OPT=\"$CPU_OPT\" LIBC=$LIBC" | |
112 ngx_pcre="PCRE=\"$PCRE\"" | |
113 ;; | |
114 | |
115 owc) | |
116 ngx_makefile=makefile.owc | |
117 ngx_opt="CPU_OPT=\"$CPU_OPT\"" | |
118 ngx_pcre=`echo PCRE=\"$PCRE\" | sed -e "s/\//$ngx_regex_dirsep/g"` | |
119 ;; | |
282
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
274
diff
changeset
|
120 |
7981 | 121 bcc) |
122 ngx_makefile=makefile.bcc | |
123 ngx_opt="-DCPU_OPT=\"$CPU_OPT\"" | |
124 ngx_pcre=`echo \-DPCRE=\"$PCRE\" \ | |
125 | sed -e "s/\//$ngx_regex_dirsep/g"` | |
126 ;; | |
127 | |
128 *) | |
129 ngx_makefile= | |
130 ;; | |
131 | |
132 esac | |
133 | |
134 | |
135 if [ -n "$ngx_makefile" ]; then | |
136 | |
137 cat << END >> $NGX_MAKEFILE | |
297
ee394e997c77
nginx-0.0.3-2004-03-29-21:43:58 import
Igor Sysoev <igor@sysoev.ru>
parents:
295
diff
changeset
|
138 |
5342
b3f6290a9401
Configure: pcre.lib dependencies fix.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4412
diff
changeset
|
139 `echo "$PCRE/pcre.lib: $PCRE/pcre.h $NGX_MAKEFILE" \ |
b3f6290a9401
Configure: pcre.lib dependencies fix.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4412
diff
changeset
|
140 | sed -e "s/\//$ngx_regex_dirsep/g"` |
2840
22c4c012c8c9
switch Win32 building to modern PCRE versions (starting from 7.1)
Igor Sysoev <igor@sysoev.ru>
parents:
2838
diff
changeset
|
141 \$(MAKE) -f auto/lib/pcre/$ngx_makefile $ngx_pcre $ngx_opt |
297
ee394e997c77
nginx-0.0.3-2004-03-29-21:43:58 import
Igor Sysoev <igor@sysoev.ru>
parents:
295
diff
changeset
|
142 |
2840
22c4c012c8c9
switch Win32 building to modern PCRE versions (starting from 7.1)
Igor Sysoev <igor@sysoev.ru>
parents:
2838
diff
changeset
|
143 `echo "$PCRE/pcre.h:" | sed -e "s/\//$ngx_regex_dirsep/g"` |
22c4c012c8c9
switch Win32 building to modern PCRE versions (starting from 7.1)
Igor Sysoev <igor@sysoev.ru>
parents:
2838
diff
changeset
|
144 \$(MAKE) -f auto/lib/pcre/$ngx_makefile $ngx_pcre pcre.h |
297
ee394e997c77
nginx-0.0.3-2004-03-29-21:43:58 import
Igor Sysoev <igor@sysoev.ru>
parents:
295
diff
changeset
|
145 |
467 | 146 END |
147 | |
7981 | 148 else |
282
30310107dbc9
nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents:
274
diff
changeset
|
149 |
7981 | 150 cat << END >> $NGX_MAKEFILE |
467 | 151 |
1164
d201e0461c3c
fix make dependecies: pcre-6.5+ already has pcre.h
Igor Sysoev <igor@sysoev.ru>
parents:
523
diff
changeset
|
152 $PCRE/pcre.h: $PCRE/Makefile |
d201e0461c3c
fix make dependecies: pcre-6.5+ already has pcre.h
Igor Sysoev <igor@sysoev.ru>
parents:
523
diff
changeset
|
153 |
d201e0461c3c
fix make dependecies: pcre-6.5+ already has pcre.h
Igor Sysoev <igor@sysoev.ru>
parents:
523
diff
changeset
|
154 $PCRE/Makefile: $NGX_MAKEFILE |
467 | 155 cd $PCRE \\ |
523 | 156 && if [ -f Makefile ]; then \$(MAKE) distclean; fi \\ |
467 | 157 && CC="\$(CC)" CFLAGS="$PCRE_OPT" \\ |
4388
005fc2d5e84f
Added support for regex study and PCRE JIT (ticket #41) optimizations on
Valentin Bartenev <vbart@nginx.com>
parents:
2840
diff
changeset
|
158 ./configure --disable-shared $PCRE_CONF_OPT |
467 | 159 |
1164
d201e0461c3c
fix make dependecies: pcre-6.5+ already has pcre.h
Igor Sysoev <igor@sysoev.ru>
parents:
523
diff
changeset
|
160 $PCRE/.libs/libpcre.a: $PCRE/Makefile |
467 | 161 cd $PCRE \\ |
162 && \$(MAKE) libpcre.la | |
163 | |
164 END | |
165 | |
7981 | 166 fi |
167 | |
5360
3d2d3e1cf427
Win32: MinGW GCC compatibility.
Maxim Dounin <mdounin@mdounin.ru>
parents:
5342
diff
changeset
|
168 fi |