Sometimes when I run composer update to upgrade the laravel project, a content-length mismatch exception might occur. Finally, I get this is because of the terrible firewall
Solved the same issue by simply upgrading zlib(1g) [deb]
(more precisely, from trusty/14.04 to xenial/16.04, both are LTS of course ;-)