rws_request_pool, rws_request_pth, rws_request_http_request, rws_request_io, rws_request_host_header, rws_request_canonical_path, rws_request_file_path - retrieve fields in rws_request object |
#include <rws_request.h> pool rws_request_pool (rws_request); pseudothread rws_request_pth (rws_request); http_request rws_request_http_request (rws_request); io_handle rws_request_io (rws_request); const char *rws_request_host_header (rws_request); const char *rws_request_canonical_path (rws_request); const char *rws_request_file_path (rws_request); |
These functions retrieve the fields in an rws_request object. This object is passed to shared object scripts when they are invoked by rws as: |
int handle_request (rws_request rq) |
rws_request_pool returns the per-request pool. If you wish to store data between requests, then use static variables, or create your own subpool of global_pool, or make allocations in _init. |
rws_request_pth returns the currently running thread handle. |
rws_request_http_request returns the current HTTP request (see new_http_request(3)). To parse the CGI parameters, you need to call new_cgi (see new_cgi(3)). |
rws_request_io returns the IO handle connected to the browser. |
rws_request_host_header returns the contents of the HTTP Host: header, or the string default if none was given. |
rws_request_canonical_path returns the canonical path requested by the browser (after removing .., //, etc.), eg. /so-bin/file.so. |
rws_request_file_path returns the actual path to the SO file being requested, eg. /usr/share/rws/so-bin/file.so. |
Richard Jones <rich@annexia.org> |
GNU LGPL (see http://www.gnu.org/) |
rws-0.9.6 |
new_cgi(3), new_http_response(3), new_http_request(3), pthrlib tutorial, rws examples/ directory. |