parameters: (self)
return_statement: return out
docstring: WSGI conform list of (header, value) tuples.
docstring_summary: WSGI conform list of (header, value) tuples.
docstring_tokens: WSGI conform list of ( header value ) tuples .
function: 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
function_tokens: 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