cnken / substitutions4nginx

Automatically exported from code.google.com/p/substitutions4nginx
3 stars 3 forks source link

SSI silently fails with subs_filter #4

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. enable ssi
2. include ssi statement in html which works example : <!--# include fil
e="/filename.html" -->
3. include a subs_filter

What is the expected output? What do you see instead?

The expected output should be the strings substituted as per the subs_filter 
directives and ssi includes to also work.

Instead, the subs_filter works perfectly, but it is breaking ssi.

removing the subs_filter from nginx.conf makes ssi working again as expected.

What version of the product are you using? On what operating system?

using the version at http://substitutions4nginx.googlecode.com/svn/trunk/ 
substitutions4nginx-read-only

# nginx -V
nginx version: nginx/0.7.67
built by gcc 4.4.1 20090725 (Red Hat 4.4.1-2) (GCC) 
TLS SNI support enabled
configure arguments: --user=nginx --group=nginx --prefix=/usr/share/nginx 
--sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf 
--error-log-path=/var/log/nginx/error.log 
--http-log-path=/var/log/nginx/access.log 
--http-client-body-temp-path=/var/lib/nginx/tmp/client_body 
--http-proxy-temp-path=/var/lib/nginx/tmp/proxy 
--http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi 
--pid-path=/var/run/nginx.pid --lock-path=/var/lock/subsys/nginx 
--with-http_ssl_module --with-http_realip_module --with-http_addition_module 
--with-http_sub_module --with-http_dav_module --with-http_flv_module 
--with-http_gzip_static_module --with-http_random_index_module 
--with-http_secure_link_module --with-http_stub_status_module --with-mail 
--with-mail_ssl_module --with-ipv6 --with-cc-opt='-O2 -g -pipe -Wall 
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector 
--param=ssp-buffer-size=4 -m64 -mtune=generic -fno-strict-aliasing' 
--add-module=/root/src/nginx/mods/substitutions4nginx-read-only/

# uname -a
Linux host.name.com 2.6.30.10-105.2.23.fc11.x86_64 #1 SMP Thu Feb 11 07:06:34 
UTC 2010 x86_64 x86_64 x86_64 GNU/Linux

Original issue reported on code.google.com by saja...@gmail.com on 5 Jul 2010 at 4:49

GoogleCodeExporter commented 9 years ago
in case it helps my subs filters looked like this

subs_filter_types text/html;
subs_filter 'http://some.host.com/somefile-3.js' 
'http://some.host.com/somefile-4.js';
subs_filter 'http://some.host.com/somefile-2.js' 
'http://some.host.com/somefile-4.js';
subs_filter 'http://another.host.com/somefile.js?v=12' 
'http://some.host.com/somefile-4.js';
subs_filter 'http://another.host.com/somefile.js?v=1' 
'http://some.host.com/somefile-4.js';
subs_filter 'http://some.host.com/somefile.js' 
'http://some.host.com/somefile-4.js';

Original comment by saja...@gmail.com on 5 Jul 2010 at 5:00

GoogleCodeExporter commented 9 years ago
Do you mean the strings which need to be replaced are produced by SSI module?

It's difficult to do that because the SSI filter module processes the body 
content after my substitutions filter module. substitutions module can't 
replace the content which has not produced. These filter module has specific 
order in Nginx.

Also the native Nginx substitution module can't do that. Sorry.

Original comment by yaoweibin@gmail.com on 21 Jul 2010 at 6:53

GoogleCodeExporter commented 9 years ago
hi Yaoweibin,

No, I am not looking to substitute the output produced from SSI module.

Just that when I am using subs_filter, the SSI module does not work at all.

It acts as if it were dissabled.

-Sajal  

Original comment by saja...@gmail.com on 21 Jul 2010 at 8:37

GoogleCodeExporter commented 9 years ago
Could you show me the debug.log? Thanks very much.

Original comment by yaoweibin@gmail.com on 21 Jul 2010 at 9:08