is there any way to make Substitution module to work with gzip?
tOmasEn
tomasen at gmail.com
Fri Jan 29 12:21:18 MSK 2010
by the way I also tried add gzip_proxied any;, but doesn't make difference.
location = /xslt/main.xsl {
proxy_set_header X-Forwarded-For
$proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://61.129.66.75:80;
gzip_proxied any;
proxy_set_header Accept-Encoding ""; //have to
use this otherwise sub_filter won't work
sub_filter_types text/xml;
sub_filter '3236699304584559' '9418887123196030' ;
sub_filter_once off;
}
On Fri, Jan 29, 2010 at 5:18 PM, tOmasEn <tomasen at gmail.com> wrote:
> maybe because of mixed with proxy pass?
>
> I use curl to test:
>
> this is the server mix proxy_pass with substitution with gzip on:
> curl -k "Host: www.shooter.cn" "http://124.155.161.176/xslt/main.xsl"
> -vvv -o x --compressed
> return 51k none-gziped content
>
> this is the original serverwith gzip on:
> curl -k -H "Host: www.shooter.cn" "http://61.129.66.75/xslt/main.xsl"
> -vvv -o x --compressed
> return 15k gziped content
>
>
> On Fri, Jan 29, 2010 at 5:00 PM, Weibin Yao <nbubingo at gmail.com> wrote:
>
>> tOmasEn at 2010-1-29 16:25 wrote:
>>
>>> Substitution module http://wiki.nginx.org/NginxHttpSubModule can replace
>>> text for content from proxy_pass.
>>>
>>> In order to use this function, it have to turn gzip transfer off from
>>> server to server, which is understandable all right.
>>>
>>> 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?
>>>
>> 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.
>>
>> --
>> Weibin Yao
>>
>>
>>
>> _______________________________________________
>> nginx mailing list
>> nginx at nginx.org
>> http://nginx.org/mailman/listinfo/nginx
>>
>
>
>
> --
> Tomasen
> http://twitter.com/ShooterPlayer
> http://t.sina.com.cn/Tomasen
>
--
Tomasen
http://twitter.com/ShooterPlayer
http://t.sina.com.cn/Tomasen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20100129/dc31ca0c/attachment.html>
More information about the nginx
mailing list