sub_filter bug?

dewil dewil.ru at gmail.com
Sat Sep 29 02:03:12 MSD 2007


Hi all.

Игорь, нашел такую бяку.
Если в location написать вот так

        location / {
            proxy_pass          http://127.0.0.1:80;
            proxy_set_header    Host            $host;
            proxy_set_header    X-Forwarded-For $remote_addr;
            sub_filter  '</body>' '</body>';
            sub_filter_once   off;
        }

наглядно видны изменения

--- index.html.1        Sat Sep 29 01:38:42 2007
+++ index.html.2        Sat Sep 29 01:39:06 2007
@@ -261,5 +261,5 @@
 <br>
 </center>

-</body>
+</body><
 </html>

Пробовал без кавычек, тоже самое.
Пробовал '</body', получаем '</body<'
Такое поведение проявляется только на главной странице одного сайта из
сотни виртуалхостов.

Что я делаю не верно?


nginx из портов.

nginx -V
nginx version: nginx/0.5.31
configure arguments: --with-http_sub_module
--prefix=/usr/local/etc/nginx --with-cc-opt=-I /usr/local/include
--with-ld-opt=-L /usr/local/lib
--conf-path=/usr/local/etc/nginx/nginx.conf
--sbin-path=/usr/local/sbin/nginx --pid-path=/var/run/nginx.pid
--error-log-path=/var/log/nginx-error.log --user=www --group=www
--with-debug --http-client-body-temp-path=/var/tmp/nginx/client_body_temp
--http-proxy-temp-path=/var/tmp/nginx/proxy_temp
--http-fastcgi-temp-path=/var/tmp/nginx/fastcgi_temp
--http-log-path=/var/log/nginx-access.log --with-http_addition_module
--with-http_dav_module --with-http_flv_module --with-http_perl_module
--with-http_realip_module --with-http_ssl_module
--with-http_stub_status_module --with-http_sub_module

FreeBSD 6.2-RELEASE-p3

--
dwl-ripe


More information about the nginx-ru mailing list