#NEWLINE# def get_headers( data , extra_headers = None ) : #NEWLINE# #INDENT# '\n    Takes the response data as well as any additional headers and returns a\n    tuple of tuples of headers suitable for passing to start_response()\n    ' #NEWLINE# response_headers = { #NEWLINE# #INDENT# 'Content-Length' : str ( len ( data ) ) , #NEWLINE# #UNINDENT# } #NEWLINE# if response_headers : #NEWLINE# #INDENT# response_headers . update ( extra_headers ) #NEWLINE# #UNINDENT# return list ( response_headers . items ( ) )