Send content-length in more cases
Merge branch 'fix-content-length'