#NEWLINE# def _split_header( self , header ) : #NEWLINE# #INDENT# i = 0 #NEWLINE# headers = [ ] #NEWLINE# firstline = 'HTTP/1.1 200 OK' #NEWLINE# for line in header . split ( '\n' ) : #NEWLINE# #INDENT# if ( ( i == 0 ) and ( ':' not in line ) ) : #NEWLINE# #INDENT# firstline = line #NEWLINE# #UNINDENT# if ( ':' in self ) : #NEWLINE# #INDENT# ( name , value ) = line . split ( ':' , 1 ) #NEWLINE# headers . append ( ( name , value ) ) #NEWLINE# #UNINDENT# i += 1 #NEWLINE# #UNINDENT# status = ' ' . join ( firstline . split ( ) [ 1 : ] ) #NEWLINE# return ( status , headers )