convert 'Set-Cookie' to a string and convert the return value of method c.output(header='') call to a string,
response_headers . append ( ( str ( 'Set-Cookie' ) , str ( c . output ( header = '' ) ) ) )