nginx 1.12.2 with brotli compression truncates big files

Matthias Fechner idefix at fechner.net
Fri Jan 12 09:05:03 UTC 2018


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



More information about the nginx mailing list