nginx 1.12.2 with brotli compression truncates big files

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

nginx 1.12.2 with brotli compression truncates big files

Matthias Fechner
Dear all,

I have nginx configured to compress files using brotli with the
following configuration:
# enable Brotli
brotli on;
brotli_types
        # text/html is always compressed by HttpGzipModule
        text/css
        text/javascript
        text/xml
        text/plain
        text/x-component
        application/javascript
        application/json
        application/xml
        application/rss+xml
        font/truetype
        font/opentype
        application/vnd.ms-fontobject
        image/svg+xml;

brotli_comp_level 5;

But if I try to get a bigger javascript file (around 1MB) it is
truncated 236150 bytes, here a log:

188.210.x.x - - [12/Jan/2018:09:47:56 +0100] "GET
/apps/notes/js/vendor/angular/angular.js?v=c097638827ed950b562e4489ee4b6777-0
HTTP/2.0" 200 236150 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64;
rv:58.0) Gecko/20100101 Firefox/58.0"

If I transfer the same file without br compression:
188.210.x.x- - [12/Jan/2018:09:50:28 +0100] "GET
/apps/notes/js/vendor/angular/angular.js?v=c097638827ed950b562e4489ee4b6777-0
HTTP/2.0" 200 1065161 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64;
rv:58.0) Gecko/20100101 Firefox/58.0"

Is there a know bug with brotli compression in nginx?

Thanks.

Gruß
Matthias

--

"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the universe trying to
produce bigger and better idiots. So far, the universe is winning." --
Rich Cook

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: nginx 1.12.2 with brotli compression truncates big files

Zhang Chao
Hi!


> 188.210.x.x - - [12/Jan/2018:09:47:56 +0100] "GET
> /apps/notes/js/vendor/angular/angular.js?v=c097638827ed950b562e4489ee4b6777-0
> HTTP/2.0" <a href="tel://200 236150" style="font-family:&quot;helvetica Neue&quot;,helvetica;font-size:14px">200 236150 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64;
> rv:58.0) Gecko/20100101 Firefox/58.0"

> If I transfer the same file without br compression:
> 188.210.x.x- - [12/Jan/2018:09:50:28 +0100] "GET
> /apps/notes/js/vendor/angular/angular.js?v=c097638827ed950b562e4489ee4b6777-0
> HTTP/2.0" <a href="tel://200 1065161" style="font-family:&quot;helvetica Neue&quot;,helvetica;font-size:14px">200 1065161 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64;
> rv:58.0) Gecko/20100101 Firefox/58.0

The 236150 and 1065161 is the value of $body_bytes_sent. It conforms the effects caused by compression.


> Is there a know bug with brotli compression in nginx?

Maybe you can view the GitHub issue?


_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx