By dynamically generating the content-length headers for the expected results, based on their actual content.