Package core :: Package controllers :: Package daemons :: Module proxy :: Class w3afProxyHandler
[hide private]

Class w3afProxyHandler




Nested Classes [hide private]

Inherited from BaseHTTPServer.BaseHTTPRequestHandler: MessageClass

Instance Methods [hide private]
 
_sendError(self, exceptionObj, trace=None)
Send an error to the browser.
 
_sendToBrowser(self, res)
Send a response that was sent by the remote web server to the browser
 
_sendToServer(self, grep=True)
Send a request that arrived from the browser to the remote web server.
 
_verify_cb(self, conn, cert, errnum, depth, ok)
Used by set_verify to check that the SSL certificate if valid.
 
doAll(self)
This method handles EVERY request that were send by the browser.
 
do_CONNECT(self)
Handle the CONNECT method.
 
handle_one_request(self)
Handle a single HTTP request.
 
log_message(self, format, *args)
I dont want messages written to stderr, please write them to the om.

Inherited from BaseHTTPServer.BaseHTTPRequestHandler: address_string, date_time_string, end_headers, handle, log_date_time_string, log_error, log_request, parse_request, send_error, send_header, send_response, version_string

Inherited from SocketServer.StreamRequestHandler: finish, setup

Inherited from SocketServer.BaseRequestHandler: __init__

Class Variables [hide private]

Inherited from BaseHTTPServer.BaseHTTPRequestHandler: error_message_format, monthname, protocol_version, responses, server_version, sys_version, weekdayname

Inherited from SocketServer.StreamRequestHandler: rbufsize, wbufsize

Method Details [hide private]

_sendError(self, exceptionObj, trace=None)

 

Send an error to the browser.

Important methods used here:
  • self.send_header : Sends a header to the browser
  • self.end_headers : Ends the headers section
  • self.wfile : A file like object that represents the body of the response

_sendToBrowser(self, res)

 

Send a response that was sent by the remote web server to the browser

Important methods used here:
  • self.send_header : Sends a header to the browser
  • self.end_headers : Ends the headers section
  • self.wfile : A file like object that represents the body of the response

_sendToServer(self, grep=True)

 

Send a request that arrived from the browser to the remote web server.

Important variables used here:
  • self.headers : Stores the headers for the request
  • self.rfile : A file like object that stores the postdata
  • self.path : Stores the URL that was requested by the browser

_verify_cb(self, conn, cert, errnum, depth, ok)

 
Used by set_verify to check that the SSL certificate if valid. In our case, we always return True.

do_CONNECT(self)

 
Handle the CONNECT method. This method is not expected to be overwritten. To understand what happens here, please read comments for HTTPServerWrapper class

handle_one_request(self)

 

Handle a single HTTP request.

You normally don't need to override this method; see the class __doc__ string for information on how to handle specific HTTP commands such as GET and POST.

I overrid this becuse I'm going to use ONE handler for all the methods (except CONNECT).
Overrides: BaseHTTPServer.BaseHTTPRequestHandler.handle_one_request

log_message(self, format, *args)

 
I dont want messages written to stderr, please write them to the om.
Overrides: BaseHTTPServer.BaseHTTPRequestHandler.log_message