by the way I also tried add gzip_proxied any;, but doesn't make difference.<br><br> location = /xslt/main.xsl {<br> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br> proxy_set_header Host $http_host;<br>
proxy_redirect off;<br> proxy_pass <a href="http://61.129.66.75:80">http://61.129.66.75:80</a>; <br> gzip_proxied any;<br> proxy_set_header Accept-Encoding ""; //have to use this otherwise sub_filter won't work<br>
sub_filter_types text/xml;<br> sub_filter '3236699304584559' '9418887123196030' ;<br> sub_filter_once off;<br> <br>
}<br><br><div class="gmail_quote">On Fri, Jan 29, 2010 at 5:18 PM, tOmasEn <span dir="ltr"><<a href="mailto:tomasen@gmail.com">tomasen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
maybe because of mixed with proxy pass?<br><br>I use curl to test:<br><br>this is the server mix proxy_pass with substitution with gzip on:<br> curl -k "Host: <a href="http://www.shooter.cn" target="_blank">www.shooter.cn</a>" "<a href="http://124.155.161.176/xslt/main.xsl" target="_blank">http://124.155.161.176/xslt/main.xsl</a>" -vvv -o x --compressed <br>
return 51k none-gziped content<br><br>this is the original serverwith gzip on:<br> curl -k -H "Host: <a href="http://www.shooter.cn" target="_blank">www.shooter.cn</a>" "<a href="http://61.129.66.75/xslt/main.xsl" target="_blank">http://61.129.66.75/xslt/main.xsl</a>" -vvv -o x --compressed<br>
return 15k gziped content<div><div></div><div class="h5"><br><br><div class="gmail_quote">On Fri, Jan 29, 2010 at 5:00 PM, Weibin Yao <span dir="ltr"><<a href="mailto:nbubingo@gmail.com" target="_blank">nbubingo@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div>tOmasEn at 2010-1-29 16:25 wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Substitution module <a href="http://wiki.nginx.org/NginxHttpSubModule" target="_blank">http://wiki.nginx.org/NginxHttpSubModule</a> can replace text for content from proxy_pass.<br>
<br>
In order to use this function, it have to turn gzip transfer off from server to server, which is understandable all right.<br>
<br>
But I want when after substitution module replaced the text, nginx can gzip it and send it to client. Is there any way to do that?<br>
</blockquote></div>
Are you sure Nginx can't gzip the response with the substitution module? AFAIK, the substitution module is a filter module before the gzip filter module. They are not conflicted.<br>
<br>
-- <br><font color="#888888">
Weibin Yao</font><div><div></div><div><br>
<br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
<a href="http://nginx.org/mailman/listinfo/nginx" target="_blank">http://nginx.org/mailman/listinfo/nginx</a><br>
</div></div></blockquote></div><br><br clear="all"><br></div></div><div><div></div><div class="h5">-- <br>Tomasen<br><a href="http://twitter.com/ShooterPlayer" target="_blank">http://twitter.com/ShooterPlayer</a><br><a href="http://t.sina.com.cn/Tomasen" target="_blank">http://t.sina.com.cn/Tomasen</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Tomasen<br><a href="http://twitter.com/ShooterPlayer">http://twitter.com/ShooterPlayer</a><br><a href="http://t.sina.com.cn/Tomasen">http://t.sina.com.cn/Tomasen</a><br>