Fixed and improved the test for the content-length update. Issue: #459