#NEWLINE# def _handle_custom_headers( self , request ) : #NEWLINE# #INDENT# if self . _get_webpage_attribute ( request , 'skip_custom_headers' ) : #NEWLINE# #INDENT# self . _set_webpage_attribute ( self , 'skip_custom_headers' , False ) #NEWLINE# return #NEWLINE# #UNINDENT# headers = self . _get_webpage_attribute ( request , 'custom_headers' ) #NEWLINE# if isinstance ( headers , dict ) : #NEWLINE# #INDENT# headers = headers . items ( ) #NEWLINE# #UNINDENT# for ( name , value ) in ( headers or [ ] ) : #NEWLINE# #INDENT# request . setRawHeader ( to_bytes ( name ) , to_bytes ( value ) )