#NEWLINE# def process_injection( self , parameters , data = None , content_type = None , headers = None ) : #NEWLINE# #INDENT# '\n        Do the HTTP request, and execute trigger.execute\n        \n        In this default impl., parameters is not used. Override this\n        to change behavior.\n        ' #NEWLINE# if self . _context . use_ssl ( ) : #NEWLINE# #INDENT# request = httplib . HTTPSConnection ( self . _server ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# request = httplib . HTTPConnection ( self . _server ) #NEWLINE# #UNINDENT# request . putrequest ( self . _method , self . build_uri ( parameters ) ) #NEWLINE# if ( data is not None ) : #NEWLINE# #INDENT# request . putheader ( 'Content-Length' , str ( len ( data ) ) ) #NEWLINE# #UNINDENT# if ( content_type is not None ) : #NEWLINE# #INDENT# request . putheader ( 'Content-Type' , content_type ) #NEWLINE# #UNINDENT# _headers = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# if self . _context . has_headers ( ) : #NEWLINE# #INDENT# for ( header , value ) in self . _context . get_headers ( ) . items : #NEWLINE# #INDENT# _headers [ header ] = value #NEWLINE# #UNINDENT# #UNINDENT# if headers : #NEWLINE# #INDENT# for ( header , value ) in headers : #NEWLINE# #INDENT# _headers [ ( header , ) ] = value #NEWLINE# #UNINDENT# #UNINDENT# for ( header , value ) in _headers : #NEWLINE# #INDENT# request . putheader ( header , value ) #NEWLINE# #UNINDENT# if ( self . _context . get_cookie ( ) is not None ) : #NEWLINE# #INDENT# request . putheader ( 'Cookie' , self . _context . get_cookie ( ) ) #NEWLINE# #UNINDENT# request . endheaders ( ) #NEWLINE# if ( data is not None ) : #NEWLINE# #INDENT# request . send ( data ) #NEWLINE# #UNINDENT# response = request . getresponse ( ) #NEWLINE# return self . process_response ( HttpResponse ( response ) )