read all headers of the response

don't assume that 1024 bytes is all you need, that might be true, but
doesn't have to. so we read (in 1024 byte-chunks) until the end ...