Close stdin after we read through all the headers