set Content-Length correctly
Merge branch 'fix/content_length'