Library ajp
A basic AJP 1.3 implementation based on documentation available from Apache mod_proxy_ajp; http://httpd.apache.org/docs/2.2/mod/mod_proxy_ajp.html
Author:
| "Patrik Karlsson <patrik@cqure.net>" |
Source: http://nmap.org/svn/nselib/ajp.lua
Functions
| close (self) |
Disconnects from the server |
| connect (self) |
Connects to the AJP server |
| delete (self, url, headers, attributes, options) |
Sends an AJP DELETE request to the server |
| get (self, url, headers, attributes, options) |
Sends an AJP GET request to the server |
| head (self, url, headers, attributes, options) |
Sends an AJP HEAD request to the server |
| new (self, host, port, opt) |
Creates a new AJP Helper instance |
| options (self, url, headers, attributes, options) |
Sends an AJP OPTIONS request to the server |
| put (self, url, headers, attributes, options) |
Sends an AJP PUT request to the server |
| request (self, method, url, headers, attributes, options) |
Sends an AJP request to the server |
| trace (self, url, headers, attributes, options) |
Sends an AJP TRACE request to the server |
Functions
- close (self)
-
Disconnects from the server
Parameters
- self:
- connect (self)
-
Connects to the AJP server
Parameters
- self:
Return values:
- status true on success, false on failure
- err string containing error message on failure
- delete (self, url, headers, attributes, options)
-
Sends an AJP DELETE request to the server
Parameters
- self:
- url: string containing the URL to query
- headers: table containing optional headers
- attributes: table containing optional attributes
- options: table with request specific options
Return values:
- status true on succes, false on failure
- response table (@see Comm.receive), or string containing error message on failure
- get (self, url, headers, attributes, options)
-
Sends an AJP GET request to the server
Parameters
- self:
- url: string containing the URL to query
- headers: table containing optional headers
- attributes: table containing optional attributes
- options: table with request specific options
Return values:
- status true on succes, false on failure
- response table (@see Comm.receive), or string containing error message on failure
- head (self, url, headers, attributes, options)
-
Sends an AJP HEAD request to the server
Parameters
- self:
- url: string containing the URL to query
- headers: table containing optional headers
- attributes: table containing optional attributes
- options: table with request specific options
Return values:
- status true on succes, false on failure
- response table (@see Comm.receive), or string containing error message on failure
- new (self, host, port, opt)
-
Creates a new AJP Helper instance
Parameters
- self:
- host: table
- port: table
- opt:
Return value:
o new Helper instance - options (self, url, headers, attributes, options)
-
Sends an AJP OPTIONS request to the server
Parameters
- self:
- url: string containing the URL to query
- headers: table containing optional headers
- attributes: table containing optional attributes
- options: table with request specific options
Return values:
- status true on succes, false on failure
- response table (@see Comm.receive), or string containing error message on failure
- put (self, url, headers, attributes, options)
-
Sends an AJP PUT request to the server
Parameters
- self:
- url: string containing the URL to query
- headers: table containing optional headers
- attributes: table containing optional attributes
- options: table with request specific options
Return values:
- status true on succes, false on failure
- response table (@see Comm.receive), or string containing error message on failure
- request (self, method, url, headers, attributes, options)
-
Sends an AJP request to the server
Parameters
- self:
- method:
- url: string containing the URL to query
- headers: table containing optional headers
- attributes: table containing optional attributes
- options: table with request specific options
Return values:
- status true on succes, false on failure
- response table (@see Comm.receive), or string containing error message on failure
- trace (self, url, headers, attributes, options)
-
Sends an AJP TRACE request to the server
Parameters
- self:
- url: string containing the URL to query
- headers: table containing optional headers
- attributes: table containing optional attributes
- options: table with request specific options
Return values:
- status true on succes, false on failure
- response table (@see Comm.receive), or string containing error message on failure


