Welcome! Log In Create A New Profile

Advanced

nginx 1.12.2 with brotli compression truncates big files

Posted by Matthias Fechner 
Matthias Fechner
nginx 1.12.2 with brotli compression truncates big files
January 12, 2018 10:10AM
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
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
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" 200 236150 <//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 <//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?

https://github.com/google/ngx_brotli
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Sorry, only registered users may post in this forum.

Click here to login