Fix content-length check
Merge pull request #589 from jleclanche/master

Fix content-length check