api/httpStream: use io.CopyN() to simplify stream copy