Simplified the way Cosa determines a page's content length.