Runtime extension of the HTTP clients that connect to the server.
Initialize a new request instance.
# File lib/rex/proto/http/server.rb, line 19 def init_cli(server) self.request = Request.new self.server = server self.keepalive = false end
Resets the parsing state.
# File lib/rex/proto/http/server.rb, line 28 def reset_cli self.request.reset end
Transmits a response and adds the appropriate headers.
# File lib/rex/proto/http/server.rb, line 35 def send_response(response) # Set the connection to close or keep-alive depending on what the client # can support. response['Connection'] = (keepalive) ? 'Keep-Alive' : 'close' # Add any other standard response headers. server.add_response_headers(response) # Send it off. put(response.to_s) end
Generated with the Darkfish Rdoc Generator 2.