Improve Content-Length error handling