Mercurial > hg > nginx-quic
annotate auto/install @ 4192:61e4af19df9f
Autoindex: escape '?' in file names.
For files with '?' in their names autoindex generated links with '?' not
escaped. This resulted in effectively truncated links as '?' indicates
query string start.
This is an updated version of the patch originally posted at [1]. It
introduces generic NGX_ESCAPE_URI_COMPONENT which escapes everything but
unreserved characters as per RFC 3986. This approach also renders unneeded
special colon processing (as colon is percent-encoded now), it's dropped
accordingly.
[1] http://nginx.org/pipermail/nginx-devel/2010-February/000112.html
Reported by Konstantin Leonov.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Tue, 11 Oct 2011 17:56:51 +0000 |
parents | 7e3c557c2604 |
children | 874a2f505e2a |
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:
440
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:
440
diff
changeset
|
2 # Copyright (C) Igor Sysoev |
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
440
diff
changeset
|
3 |
440
f390d1775430
nginx-0.1.0-2004-09-27-20:03:21 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
4 |
599 | 5 if [ $USE_PERL = YES ]; then |
6 | |
7 cat << END >> $NGX_MAKEFILE | |
8 | |
9 install_perl_modules: | |
10 cd $NGX_OBJS/src/http/modules/perl && make install | |
11 END | |
12 | |
13 NGX_INSTALL_PERL_MODULES=install_perl_modules | |
14 | |
15 fi | |
16 | |
17 | |
2758 | 18 case ".$NGX_SBIN_PATH" in |
19 ./*) | |
20 ;; | |
21 | |
22 .) | |
23 NGX_SBIN_PATH=$NGX_PREFIX/sbin/nginx | |
24 ;; | |
25 | |
26 *) | |
27 NGX_SBIN_PATH=$NGX_PREFIX/$NGX_SBIN_PATH | |
28 ;; | |
29 esac | |
30 | |
31 | |
32 case ".$NGX_CONF_PATH" in | |
33 ./*) | |
34 ;; | |
35 | |
36 *) | |
37 NGX_CONF_PATH=$NGX_PREFIX/$NGX_CONF_PATH | |
38 ;; | |
39 esac | |
40 | |
41 | |
42 NGX_CONF_PREFIX=`dirname $NGX_CONF_PATH` | |
43 | |
44 | |
45 case ".$NGX_PID_PATH" in | |
46 ./*) | |
47 ;; | |
48 | |
49 *) | |
50 NGX_PID_PATH=$NGX_PREFIX/$NGX_PID_PATH | |
51 ;; | |
52 esac | |
53 | |
54 | |
55 case ".$NGX_ERROR_LOG_PATH" in | |
56 ./*) | |
57 ;; | |
58 | |
59 *) | |
60 NGX_ERROR_LOG_PATH=$NGX_PREFIX/$NGX_ERROR_LOG_PATH | |
61 ;; | |
62 esac | |
63 | |
64 | |
65 case ".$NGX_HTTP_LOG_PATH" in | |
66 ./*) | |
67 ;; | |
68 | |
69 *) | |
70 NGX_HTTP_LOG_PATH=$NGX_PREFIX/$NGX_HTTP_LOG_PATH | |
71 ;; | |
72 esac | |
73 | |
74 | |
469 | 75 cat << END >> $NGX_MAKEFILE |
467 | 76 |
4007
7e3c557c2604
Rebuild manpage only if needed.
Maxim Dounin <mdounin@mdounin.ru>
parents:
3801
diff
changeset
|
77 manpage: $NGX_OBJS/nginx.8 |
7e3c557c2604
Rebuild manpage only if needed.
Maxim Dounin <mdounin@mdounin.ru>
parents:
3801
diff
changeset
|
78 |
7e3c557c2604
Rebuild manpage only if needed.
Maxim Dounin <mdounin@mdounin.ru>
parents:
3801
diff
changeset
|
79 $NGX_OBJS/nginx.8: man/nginx.8 $NGX_AUTO_CONFIG_H |
3788 | 80 sed -e "s|%%PREFIX%%|$NGX_PREFIX|" \\ |
81 -e "s|%%PID_PATH%%|$NGX_PID_PATH|" \\ | |
82 -e "s|%%CONF_PATH%%|$NGX_CONF_PATH|" \\ | |
83 -e "s|%%ERROR_LOG_PATH%%|$NGX_ERROR_LOG_PATH|" \\ | |
3801
569716d0e447
add man page in release tarball and fix man building procedure
Igor Sysoev <igor@sysoev.ru>
parents:
3788
diff
changeset
|
84 < man/nginx.8 > $NGX_OBJS/nginx.8 |
3788 | 85 |
2009 | 86 install: $NGX_OBJS${ngx_dirsep}nginx${ngx_binext} \ |
599 | 87 $NGX_INSTALL_PERL_MODULES |
2009 | 88 test -d '\$(DESTDIR)$NGX_PREFIX' || mkdir -p '\$(DESTDIR)$NGX_PREFIX' |
440
f390d1775430
nginx-0.1.0-2004-09-27-20:03:21 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
89 |
2009 | 90 test -d '\$(DESTDIR)`dirname "$NGX_SBIN_PATH"`' \ |
91 || mkdir -p '\$(DESTDIR)`dirname "$NGX_SBIN_PATH"`' | |
92 test ! -f '\$(DESTDIR)$NGX_SBIN_PATH' \ | |
93 || mv '\$(DESTDIR)$NGX_SBIN_PATH' \ | |
94 '\$(DESTDIR)$NGX_SBIN_PATH.old' | |
95 cp $NGX_OBJS/nginx '\$(DESTDIR)$NGX_SBIN_PATH' | |
440
f390d1775430
nginx-0.1.0-2004-09-27-20:03:21 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
96 |
2009 | 97 test -d '\$(DESTDIR)$NGX_CONF_PREFIX' \ |
98 || mkdir -p '\$(DESTDIR)$NGX_CONF_PREFIX' | |
440
f390d1775430
nginx-0.1.0-2004-09-27-20:03:21 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
99 |
2009 | 100 cp conf/koi-win '\$(DESTDIR)$NGX_CONF_PREFIX' |
101 cp conf/koi-utf '\$(DESTDIR)$NGX_CONF_PREFIX' | |
102 cp conf/win-utf '\$(DESTDIR)$NGX_CONF_PREFIX' | |
440
f390d1775430
nginx-0.1.0-2004-09-27-20:03:21 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
103 |
2009 | 104 test -f '\$(DESTDIR)$NGX_CONF_PREFIX/mime.types' \ |
105 || cp conf/mime.types '\$(DESTDIR)$NGX_CONF_PREFIX' | |
106 cp conf/mime.types '\$(DESTDIR)$NGX_CONF_PREFIX/mime.types.default' | |
440
f390d1775430
nginx-0.1.0-2004-09-27-20:03:21 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
107 |
2009 | 108 test -f '\$(DESTDIR)$NGX_CONF_PREFIX/fastcgi_params' \ |
109 || cp conf/fastcgi_params '\$(DESTDIR)$NGX_CONF_PREFIX' | |
110 cp conf/fastcgi_params \ | |
111 '\$(DESTDIR)$NGX_CONF_PREFIX/fastcgi_params.default' | |
1352 | 112 |
3383 | 113 test -f '\$(DESTDIR)$NGX_CONF_PREFIX/fastcgi.conf' \ |
114 || cp conf/fastcgi.conf '\$(DESTDIR)$NGX_CONF_PREFIX' | |
115 cp conf/fastcgi.conf '\$(DESTDIR)$NGX_CONF_PREFIX/fastcgi.conf.default' | |
116 | |
3609 | 117 test -f '\$(DESTDIR)$NGX_CONF_PREFIX/uwsgi_params' \ |
118 || cp conf/uwsgi_params '\$(DESTDIR)$NGX_CONF_PREFIX' | |
119 cp conf/uwsgi_params \ | |
120 '\$(DESTDIR)$NGX_CONF_PREFIX/uwsgi_params.default' | |
121 | |
3637 | 122 test -f '\$(DESTDIR)$NGX_CONF_PREFIX/scgi_params' \ |
123 || cp conf/scgi_params '\$(DESTDIR)$NGX_CONF_PREFIX' | |
124 cp conf/scgi_params \ | |
125 '\$(DESTDIR)$NGX_CONF_PREFIX/scgi_params.default' | |
126 | |
2009 | 127 test -f '\$(DESTDIR)$NGX_CONF_PATH' \ |
2982
fe23e95ba993
name of file specified in --conf-path was not honored during installation
Igor Sysoev <igor@sysoev.ru>
parents:
2850
diff
changeset
|
128 || cp conf/nginx.conf '\$(DESTDIR)$NGX_CONF_PATH' |
2009 | 129 cp conf/nginx.conf '\$(DESTDIR)$NGX_CONF_PREFIX/nginx.conf.default' |
440
f390d1775430
nginx-0.1.0-2004-09-27-20:03:21 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
130 |
2009 | 131 test -d '\$(DESTDIR)`dirname "$NGX_PID_PATH"`' \ |
132 || mkdir -p '\$(DESTDIR)`dirname "$NGX_PID_PATH"`' | |
440
f390d1775430
nginx-0.1.0-2004-09-27-20:03:21 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
133 |
2009 | 134 test -d '\$(DESTDIR)`dirname "$NGX_HTTP_LOG_PATH"`' || \ |
135 mkdir -p '\$(DESTDIR)`dirname "$NGX_HTTP_LOG_PATH"`' | |
440
f390d1775430
nginx-0.1.0-2004-09-27-20:03:21 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
136 |
2009 | 137 test -d '\$(DESTDIR)$NGX_PREFIX/html' \ |
138 || cp -r html '\$(DESTDIR)$NGX_PREFIX' | |
440
f390d1775430
nginx-0.1.0-2004-09-27-20:03:21 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
139 END |
f390d1775430
nginx-0.1.0-2004-09-27-20:03:21 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
140 |
f390d1775430
nginx-0.1.0-2004-09-27-20:03:21 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
141 |
2009 | 142 if test -n "\$(DESTDIR)$NGX_ERROR_LOG_PATH"; then |
469 | 143 cat << END >> $NGX_MAKEFILE |
444
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
440
diff
changeset
|
144 |
2009 | 145 test -d '\$(DESTDIR)`dirname "$NGX_ERROR_LOG_PATH"`' || \ |
146 mkdir -p '\$(DESTDIR)`dirname "$NGX_ERROR_LOG_PATH"`' | |
444
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
440
diff
changeset
|
147 END |
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
440
diff
changeset
|
148 |
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
440
diff
changeset
|
149 fi |
2850
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
150 |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
151 |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
152 # create Makefile |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
153 |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
154 cat << END >> Makefile |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
155 |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
156 build: |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
157 \$(MAKE) -f $NGX_MAKEFILE |
3801
569716d0e447
add man page in release tarball and fix man building procedure
Igor Sysoev <igor@sysoev.ru>
parents:
3788
diff
changeset
|
158 \$(MAKE) -f $NGX_MAKEFILE manpage |
2850
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
159 |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
160 install: |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
161 \$(MAKE) -f $NGX_MAKEFILE install |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
162 |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
163 upgrade: |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
164 $NGX_SBIN_PATH -t |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
165 |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
166 kill -USR2 \`cat $NGX_PID_PATH\` |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
167 sleep 1 |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
168 test -f $NGX_PID_PATH.oldbin |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
169 |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
170 kill -QUIT \`cat $NGX_PID_PATH.oldbin\` |
4e05bd832e56
fix "make upgrade" broken in r2759
Igor Sysoev <igor@sysoev.ru>
parents:
2758
diff
changeset
|
171 END |