'Converts all values to ascii strings.'

def _convert_to_ascii(self, *values):

    for value in values:
        if isinstance(value, unicode):
            try:
                value = value.encode('us-ascii')
            except UnicodeError as e:
                e.reason += ',    HTTP    response    headers    must    be    in    US-ASCII    format'
                raise
        else:
            value = str(value)
        if (('\n' in value) or ('\r' in value)):
            raise BadHeaderError(("Header    values    can't    contain    newlines    (got    %r)" % value))
        (yield value)
