# Gzip issue

**URL:** <https://www.ruby-forum.com/t/gzip-issue/199684>\
**Category:** NGINX\
**Created:** [November 26, 2010, 10:40am UTC](https://www.ruby-forum.com/t/gzip-issue/199684 "2010-11-26T10:40:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/77aa72/32.png) [@Dobai-Pataky\_BSSSSl](https://www.ruby-forum.com/u/Dobai-Pataky_BSSSSl)\
**Post date:** [November 26, 2010, 10:40am UTC](https://www.ruby-forum.com/t/gzip-issue/199684/1 "2010-11-26T10:40:30Z")

</div>

Hello!

I use gzip feature with following configuration.  
If upstream server doesn’t make a gzip file, everything is ok and  
perfect.

However if upstream server makes a gzip file, NGINX always send a gzip  
file to client.  
in this case, NGINX doesn’t check both accep-enconding and user-agent.

################

# gzip configuration w/ nginx/0.8.53

################  
gzip\_static on;  
gzip on;  
gzip\_buffers 64 8k; # 64\*8 = 512kbytes  
gzip\_comp\_level 2;  
gzip\_http\_version 1.0;  
gzip\_types text/plain text/css application/x-javascript text/xml  
application/xml application/xml+rss text/javascript  
application/javascript;  
gzip\_min\_length 1100;  
gzip\_disable “msie6”;  
gzip\_vary on;

/YM

Posted at Nginx Forum:

> **[gzip issue.](https://forum.nginx.org/read.php?2,153432,153432#msg-153432)**
>
> Hello! I use gzip feature with following configuration. If upstream server doesn't make a gzip file, everything is ok and perfect. However if upstream server makes a gzip file, NGINX always send a gzip file to client. in this case, NGINX doesn't...

---

<div class="post-metadata">

**Author:** ![doors](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/eb8c5e/32.png) [@doors](https://www.ruby-forum.com/u/doors)\
**Post date:** [November 26, 2010, 12:36pm UTC](https://www.ruby-forum.com/t/gzip-issue/199684/2 "2010-11-26T12:36:33Z")

</div>

Hello!

On Fri, Nov 26, 2010 at 04:38:56AM -0500, doors wrote:

> Hello!
> 
> I use gzip feature with following configuration.  
> If upstream server doesn’t make a gzip file, everything is ok and  
> perfect.
> 
> However if upstream server makes a gzip file, NGINX always send a gzip  
> file to client.  
> in this case, NGINX doesn’t check both accep-enconding and user-agent.

If upstream server returned gzip response - nginx won’t touch it.  
It’s expected behaviour.

If you really want nginx to gunzip upstream responses - you may  
install gunzip module as available here:

> **[ngx\_http\_gunzip\_filter\_module: log](http://mdounin.ru/hg/ngx_http_gunzip_filter_module/)**

[http://mdounin.ru/hg/files/ngx\_http\_gunzip\_filter\_module-0.3.tar.gz](http://mdounin.ru/hg/files/ngx_http_gunzip_filter_module-0.3.tar.gz)

Maxim D.
