<div dir="ltr"><div>Err, After few hours of debugging, and writing email here, I've realised that I have `gzip off;` in http {} block of configuration. After enabling gzip in http block everything works fine. Is it correct behaviour that no warning is issued with such configuration?<br></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><br>--<br>Peter.</div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, May 11, 2021 at 6:09 PM Peter Volkov <<a href="mailto:peter.volkov@gmail.com">peter.volkov@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi, I have a HTTP/1.0 web server that streams chunked content to clients. It does not gzip content so I would like to use nginx as reverse proxy to compress output from this server. Yet, no matter what I do nginx is not compressing results. For nginx I'm using following config:<br></div><div><br></div><div>server {</div><div> gzip on;<br> gzip_comp_level 5;<br> gzip_http_version 1.0;<br> gzip_buffers 4 32k;<br> gzip_min_length 0;<br> gzip_types application/octet-stream;<br> gzip_proxied any;<br> gzip_vary on;<br><br> proxy_buffering off;<br><br> location / {<br> proxy_pass <a href="http://10.239.254.17:9102" target="_blank">http://10.239.254.17:9102</a>;<br> }<br></div><div><div dir="ltr">}</div><div dir="ltr"><br>Then I'm using curl to request content:</div><div dir="ltr"><br>curl -v IP:9202 -H 'Accept-Encoding: deflate, gzip' -o output<br></div><div>=====================================================<br>> GET / HTTP/1.1<br>> Host: IP:9202<br>> User-Agent: curl/7.76.1<br>> Accept: */*<br>> Accept-Encoding: deflate, gzip<br>> <br>* Mark bundle as not supporting multiuse<br>< HTTP/1.1 200 OK<br>< Server: nginx/1.17.5<br>< Date: Tue, 11 May 2021 15:05:56 GMT<br>< Content-Type: application/octet-stream<br>< Transfer-Encoding: chunked<br>< Connection: keep-alive<br>< Keep-Alive: timeout=20<br>< Accept-Ranges: none<br>< Cache-Control: no-cache<br>< <br>{ [672 bytes data]<br>100 3343k 0 3343k 0 0 4866k 0 --:--:-- --:--:-- --:--:-- 4859k^C<br>=====================================================<br><br>In result output is not compressed. What may cause this behaviour?</div><div><br>This is how request/respond to downstream server looks like:<br></div><div> curl -v <a href="http://10.239.254.17:9102" target="_blank">http://10.239.254.17:9102</a><br>* Trying 10.239.254.17:9102...<br>* TCP_NODELAY set<br>* Connected to 10.239.254.17 (10.239.254.17) port 9102 (#0)<br>> GET / HTTP/1.1<br>> Host: <a href="http://10.239.254.17:9102" target="_blank">10.239.254.17:9102</a><br>> User-Agent: curl/7.66.0<br>> Accept: */*<br>> <br>* Mark bundle as not supporting multiuse<br>* HTTP 1.0, assume close after body<br>< HTTP/1.0 200 OK<br>< Server: UDP to HTTP tool with smart buffering<br>< Accept-Ranges: none<br>< Content-type: application/octet-stream<br>< Cache-Control: no-cache<br><br><br>Thanks in advance for any help,</div><div dir="ltr">--<br>Peter.</div></div></div>
</blockquote></div>