In chat(), add another last-chunk-check right after parsing the server headers.