Added check to ensure the content-length header is set before rejecting small responses