Note that to calculate the content length, you should replace the `lineSeparator` by an empty space.