stream: only set size to total_size if client set it to 0