WebApp Library Request Handling package

Classes
struct wa_handler
struct wa_hostdata
char *addr
char *host
int port
struct wa_request
char *args
char *auth
long clen
wa_hostdata *clnt
char *ctyp
void *data
wa_handler *hand
apr_table_t *hdrs
char *meth
apr_pool_t *pool
char *prot
long rlen
char *ruri
char *schm
wa_hostdata *serv
char *user

Global Functions
const char *wa_ralloc(wa_request **r, wa_handler *h, void *d)
int wa_rerror(const char *file, const int line, wa_request *r, int s, const char *fmt, ...)
const char *wa_rfree(wa_request *r)
int wa_rinvoke(wa_request *r, wa_application *a)

Class "wa_handler" Detail:
wa_handler
struct wa_handler {
};

The webserver request handler callback structure.

Class "wa_hostdata" Detail:
wa_hostdata
struct wa_hostdata {
char *addr;
char *host;
int port;
};

The host description structure.

Class "wa_hostdata" Variables:
addr
char *addr;
The host address (as a string - no worries about IPv6)

host
char *host;
The host name.

port
int port;
The port number.

Class "wa_request" Detail:
wa_request
struct wa_request {
char *args;
char *auth;
long clen;
wa_hostdata *clnt;
char *ctyp;
void *data;
wa_handler *hand;
apr_table_t *hdrs;
char *meth;
apr_pool_t *pool;
char *prot;
long rlen;
char *ruri;
char *schm;
wa_hostdata *serv;
char *user;
};

The WebApp Library HTTP request structure.
This structure encapsulates an HTTP request to be handled within the scope of one of the configured applications.

Class "wa_request" Variables:
args
char *args;
The URL-encoded list of HTTP query arguments from the request.

auth
char *auth;
The authentication method or NULL.

clen
long clen;
The content length of this request.

clnt
wa_hostdata *clnt;
The client host data.

ctyp
char *ctyp;
The content type of this request.

data
void *data;
The web-server specific callback data.

hand
wa_handler *hand;
The request handler structure associated with this request.

hdrs
apr_table_t *hdrs;
The current headers table.

meth
char *meth;
The HTTP method (ex. GET, POST...).

pool
apr_pool_t *pool;
The APR memory pool where this request is allocated.

prot
char *prot;
The HTTP protocol name and version (ex. HTTP/1.0, HTTP/1.1...).

rlen
long rlen;
The number of bytes read out of this request body.

ruri
char *ruri;
The HTTP request URI (ex. /webapp/index.html).

schm
char *schm;
The HTTP request URL scheme (the part before ://, ex http, https).

serv
wa_hostdata *serv;
The server host data.

user
char *user;
The remote user name or NULL.

Global Functions Detail:
wa_ralloc
const char *wa_ralloc(wa_request **r, wa_handler *h, void *d);
Allocate a new request structure.
Parameters
r - A pointer to where the newly allocated wa_request structure must be allocated.
h - The web-server specific handler for this request.
d - The web-server specific data for this request.
Return Value
An error message on faliure or NULL.

wa_rerror
int wa_rerror(const char *file, const int line, wa_request *r, int s, const char *fmt, ...);
Report an HTTP error to the client.
Parameters
r - The WebApp Library request structure.
s - The HTTP response status number.
fmt - The message format string (printf style). ... The parameters to the format string.
Return Value
The HTTP result code of this operation.

wa_rfree
const char *wa_rfree(wa_request *r);
Clean up and free the memory used by a request structure.
Parameters
r - The request structure to destroy.
Return Value
An error message on faliure or NULL.

wa_rinvoke
int wa_rinvoke(wa_request *r, wa_application *a);
Invoke a request in a web application.
Parameters
r - The WebApp Library request structure.
a - The application to which this request needs to be forwarded.
Return Value
The HTTP result code of this operation.

Copyright © 2001, The Apache Software Foundation.
All Rights Reserved.
Generated with
ScanDoc 0.14 on Fri Sep 21 17:47:55 2001