def send_wsgi_response(status, headers, content, start_response, cors_handler=None):
 if cors_handler:
  cors_handler.update_headers(headers)
 content_len = (len(content) if content else 0)
 headers = [(header, value) for (header, value) in headers if (header.lower() != 'content-length')]
 headers.append(('Content-Length', ('%s' % content_len)))
 start_response(status, headers)
 return content

def send_wsgi_response ( status , headers , content , start_response , cors_handler = None ) : if cors_handler : cors_handler . update_headers ( headers ) content_len = ( len ( content ) if content else 0 ) headers = [ ( header , value ) for ( header , value ) in headers if ( header . lower ( ) != 'content-length' ) ] headers . append ( ( 'Content-Length' , ( '%s' % content_len ) ) ) start_response ( status , headers ) return content
dump reformatted response to cgi start_response .