#NEWLINE# def build_headers_frame( headers , encoder = None ) : #NEWLINE# #INDENT# f = HeadersFrame ( 1 ) #NEWLINE# e = encoder #NEWLINE# if ( e is None ) : #NEWLINE# #INDENT# e = Encoder ( ) #NEWLINE# e . huffman_coder = HuffmanEncoder ( REQUEST_CODES , REQUEST_CODES_LENGTH ) #NEWLINE# #UNINDENT# f . data = e . encode ( headers ) #NEWLINE# f . flags . add ( 'END_HEADERS' ) #NEWLINE# return f