(self)
return out
WSGI conform list of (header, value) tuples.
WSGI conform list of (header, value) tuples.
WSGI conform list of ( header value ) tuples .
def headerlist(self):
        ''' WSGI conform list of (header, value) tuples. '''
        out = []
        headers = list(self._headers.items())
        if 'Content-Type' not in self._headers:
            headers.append(('Content-Type', [self.default_content_type]))
        if self._status_code in self.bad_headers:
            bad_headers = self.bad_headers[self._status_code]
            headers = [h for h in headers if h[0] not in bad_headers]
        out += [(name, val) for name, vals in headers for val in vals]
        if self._cookies:
            for c in self._cookies.values():
                out.append(('Set-Cookie', c.OutputString()))
        return out
def headerlist ( self ) : out = [ ] headers = list ( self . _headers . items ( ) ) if 'Content-Type' not in self . _headers : headers . append ( ( 'Content-Type' , [ self . default_content_type ] ) ) if self . _status_code in self . bad_headers : bad_headers = self . bad_headers [ self . _status_code ] headers = [ h for h in headers if h [ 0 ] not in bad_headers ] out += [ ( name , val ) for name , vals in headers for val in vals ] if self . _cookies : for c in self . _cookies . values ( ) : out . append ( ( 'Set-Cookie' , c . OutputString ( ) ) ) return out