Welcome! Log In Create A New Profile

Advanced

Does Nginx handle Content-Encoding: gzip ?

Posted by rbotzer 
Does Nginx handle Content-Encoding: gzip ?
June 09, 2010 05:32PM
Apache, with the help of mod_deflate can handle gzip compressed [i]requests[/i] with the directive SetInputFilter DEFLATE.

Does Nginx handle compressed requests, i.e. ones with Content-Encoding: gzip ?

Right now when I POST a compressed request at Nginx it comes in as gzipped garbage into Phusion Passenger (that is Nginx doesn't decompress the incoming request before passing it on)

Thanks,
Ronen
Re: Does Nginx handle Content-Encoding: gzip ?
August 17, 2010 11:41AM
Would love to know the answer to this one, since I'm running into the same issue... I have to POST enormous blobs of JSON from a client app, and would really like to compress them.
Re: Does Nginx handle Content-Encoding: gzip ?
August 24, 2011 02:27PM
I'm also curious about handling compressed requests. You can do this with Apache by setting an input filter as described here: http://httpd.apache.org/docs/2.2/mod/mod_deflate.html#input

Does nginx have anything similar?
Re: Does Nginx handle Content-Encoding: gzip ?
August 25, 2011 12:16PM
Yes, it does:

http://wiki.nginx.org/HttpGzipModule


Andrejs
Re: Does Nginx handle Content-Encoding: gzip ?
August 25, 2011 01:22PM
I certainly agree that nginx supports gzip compression for *responses*. And it's great at that :)

But I haven't seen the gzip module do *decompression* for *requests*.

That is, if a request body is compressed (say a POST of a large request containing some client data which is compressed, including *request* header Content-Encoding: gzip), does nginx support decompressing that request before handing the (now decompressed) request to some backend server?



Edited 1 time(s). Last edit at 08/25/2011 01:23PM by gerner.
Re: Does Nginx handle Content-Encoding: gzip ?
August 29, 2016 05:23PM
Anyone knows if this is supported in current latest version?
Re: Does Nginx handle Content-Encoding: gzip ?
August 29, 2016 05:32PM
Found it at http://www.pataliebre.net/howto-make-nginx-decompress-a-gzipped-request.html#.V8SmwTXgn91
Re: Does Nginx handle Content-Encoding: gzip ?
August 29, 2016 06:03PM
This is a Lua feature and will always work because its not directly related to nginx-core.
Search for openresty.

---
nginx for Windows http://nginx-win.ecsds.eu/
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 162
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready