| Http | Http service object. |
| HttpAuth | Authorization. |
| HttpCache | Cache Control. |
| HttpConn | Http Connections. |
| HttpEndpoint | Listening endpoints. |
| HttpHost | Host Object. |
| HttpLimits | Http limits. |
| HttpPacket | Packet object. |
| HttpQueue | Queue object. |
| HttpRange | Content range structure. |
| HttpRoute | Route Control. |
| HttpRx | Http Rx. |
| HttpStage | Pipeline Stages. |
| HttpTx | Http Tx. |
| HttpUploadFile | Upload File. |
| HttpUri | URI management. |
| struct HttpConn* | httpAccept(struct HttpEndpoint *endpoint) |
| Internal APIs. | |
| HttpConn* | httpAcceptConn(HttpEndpoint *endpoint, MprEvent *event) |
| Accept a new connection. | |
| void | httpAddCache(struct HttpRoute *route, cchar *methods, cchar *uris, cchar *extensions, cchar *types, MprTime clientLifespan, MprTime serverLifespan, int flags) |
| Add caching for response content. | |
| int | httpAddGroup(HttpAuth *auth, cchar *group, HttpAcl acl, bool enabled) |
| Add a group. | |
| void | httpAddHeader(HttpConn *conn, cchar *key, cchar *fmt, ...) |
| Add a header to the transmission using a format string. | |
| void | httpAddHeaderString(HttpConn *conn, cchar *key, cchar *value) |
| Add a header to the transmission. | |
| void | httpAddHomeRoute(HttpRoute *parent) |
| Add a route for the home page. | |
| void | httpAddHostToEndpoint(HttpEndpoint *endpoint, struct HttpHost *host) |
| Add a host to an endpoint. | |
| void | httpAddOption(MprHash *options, cchar *field, cchar *value) |
| Add an option to the options table. | |
| void | httpAddParams(HttpConn *conn) |
| Add query and form body data to params. | |
| void | httpAddResource(HttpRoute *parent, cchar *resource) |
| Add routes for a resource. | |
| void | httpAddResourceGroup(HttpRoute *parent, cchar *resource) |
| Add routes for a group of resources. | |
| int | httpAddRoute(HttpHost *host, HttpRoute *route) |
| Add a route to a host. | |
| int | httpAddRouteCondition(HttpRoute *route, cchar *name, cchar *details, int flags) |
| Add a route condition. | |
| void | httpAddRouteErrorDocument(HttpRoute *route, int status, cchar *uri) |
| Add an error document. | |
| void | httpAddRouteExpiry(HttpRoute *route, MprTime when, cchar *extensions) |
| Cache response content in the client by extension. | |
| void | httpAddRouteExpiryByType(HttpRoute *route, MprTime when, cchar *mimeTypes) |
| Cache response content in the client by mime type. | |
| int | httpAddRouteFilter(HttpRoute *route, cchar *name, cchar *extensions, int direction) |
| Add a route filter. | |
| int | httpAddRouteHandler(HttpRoute *route, cchar *name, cchar *extensions) |
| Add a route handler. | |
| void | httpAddRouteHeader(HttpRoute *route, cchar *header, cchar *value, int flags) |
| Add a route header check. | |
| void | httpAddRouteIndex(HttpRoute *route, cchar *path) |
| Set the route index document. | |
| int | httpAddRouteLanguageDir(HttpRoute *route, cchar *language, cchar *path) |
| Add a route language directory. | |
| int | httpAddRouteLanguageSuffix(HttpRoute *route, cchar *language, cchar *suffix, int flags) |
| Add a route language suffix. | |
| void | httpAddRouteParam(HttpRoute *route, cchar *field, cchar *value, int flags) |
| Add a route param check. | |
| void | httpAddRouteSet(HttpRoute *parent, cchar *set) |
| Add a route set package. | |
| int | httpAddRouteUpdate(HttpRoute *route, cchar *name, cchar *details, int flags) |
| Add a route update rule. | |
| void | httpAddStaticRoute(HttpRoute *parent) |
| Add a route for static content under a "static" directory. | |
| void | httpAddUploadFile(HttpConn *conn, cchar *id, HttpUploadFile *file) |
| Add an Uploaded file. | |
| int | httpAddUser(HttpAuth *auth, cchar *realm, cchar *user, cchar *password, bool enabled) |
| Add a user. | |
| int | httpAddUserToGroup(HttpAuth *auth, HttpGroup *gp, cchar *user) |
| Add a user to a group. | |
| int | httpAddUsersToGroup(HttpAuth *auth, cchar *group, cchar *users) |
| Add users to a group. | |
| void | httpAdjustPacketEnd(HttpPacket *packet, MprOff size) |
| Adjust the packet end position. | |
| void | httpAdjustPacketStart(HttpPacket *packet, MprOff size) |
| Adjust the packet starting position. | |
| void | httpAppendHeader(HttpConn *conn, cchar *key, cchar *fmt, ...) |
| Append a transmission header. | |
| void | httpAppendHeaderString(HttpConn *conn, cchar *key, cchar *value) |
| Append a transmission header string. | |
| void | httpBackupRouteLog(HttpRoute *route) |
| Backup the route log if required. | |
| void | httpCallEvent(HttpConn *conn, int mask) |
| Call httpEvent with the given event mask. | |
| void | httpClearRouteStages(HttpRoute *route, int direction) |
| Clear the pipeline stages for the route. | |
| HttpHost* | httpCloneHost(HttpHost *parent) |
| Clone a host. | |
| HttpPacket* | httpClonePacket(HttpPacket *orig) |
| Clone a packet. | |
| HttpStage* | httpCloneStage(Http *http, HttpStage *stage) |
| Create a clone of an existing state. | |
| HttpUri* | httpCloneUri(HttpUri *base, int complete) |
| Clone a URI. | |
| void | httpCloseConn(HttpConn *conn) |
| Close a connection. | |
| HttpUri* | httpCompleteUri(HttpUri *uri, HttpUri *other) |
| Complete the given URI. | |
| int | httpConfigureNamedVirtualEndpoints(Http *http, cchar *ip, int port) |
| Configure endpoints with named virtual hosts. | |
| void | httpConnTimeout(HttpConn *conn) |
| Signal a connection timeout on a connection. | |
| int | httpConnect(HttpConn *conn, cchar *method, cchar *uri) |
| Connect to a server and issue Http client request. | |
| void | httpConnectorComplete(HttpConn *conn) |
| Connector has completed sending the response. | |
| void | httpConsumeLastRequest(HttpConn *conn) |
| Consume leftover data from the last request. | |
| bool | httpContentNotModified(HttpConn *conn) |
| Test if the content has not been modified. | |
| Http* | httpCreate() |
| Create a Http service object. | |
| HttpRoute* | httpCreateAliasRoute(HttpRoute *parent, cchar *pattern, cchar *path, int status) |
| Create a route suitable for use as an alias. | |
| HttpAuth* | httpCreateAuth() |
| Create an authentication object. | |
| void | httpCreateCGIParams(HttpConn *conn) |
| Create CGI parameters. | |
| HttpEndpoint* | httpCreateConfiguredEndpoint(cchar *home, cchar *documents, cchar *ip, int port) |
| Create and configure a new endpoint. | |
| HttpRoute* | httpCreateConfiguredRoute(struct HttpHost *host, int serverSide) |
| Create a configured route. | |
| HttpConn* | httpCreateConn(Http *http, struct HttpEndpoint *endpoint, MprDispatcher *dispatcher) |
| Create a connection object. | |
| HttpStage* | httpCreateConnector(Http *http, cchar *name, int flags, MprModule *module) |
| Create a connector stage. | |
| HttpPacket* | httpCreateDataPacket(ssize size) |
| Create a data packet. | |
| HttpRoute* | httpCreateDefaultRoute(struct HttpHost *host) |
| Create a default route for a host. | |
| HttpPacket* | httpCreateEndPacket() |
| Create an eof packet. | |
| HttpEndpoint* | httpCreateEndpoint(cchar *ip, int port, MprDispatcher *dispatcher) |
| Create an endpoint object. | |
| HttpPacket* | httpCreateEntityPacket(MprOff pos, MprOff size, HttpFillProc fill) |
| Create an entity data packet. | |
| HttpStage* | httpCreateFilter(Http *http, cchar *name, int flags, MprModule *module) |
| Create a filter stage. | |
| HttpGroup* | httpCreateGroup(HttpAuth *auth, cchar *name, HttpAcl acl, bool enabled) |
| Create a new group. | |
| HttpStage* | httpCreateHandler(Http *http, cchar *name, int flags, MprModule *module) |
| Create a request handler stage. | |
| HttpPacket* | httpCreateHeaderPacket() |
| Create a response header packet. | |
| HttpHost* | httpCreateHost() |
| Create a host. | |
| HttpRoute* | httpCreateInheritedRoute(HttpRoute *route) |
| Create a route inherited from a parent route. | |
| HttpLimits* | httpCreateLimits(int serverSide) |
| Create a new limits object. | |
| HttpPacket* | httpCreatePacket(ssize size) |
| Create a data packet. | |
| HttpRoute* | httpCreateRoute(struct HttpHost *host) |
| Create a route for a host. | |
| void | httpCreateRxPipeline(HttpConn *conn, struct HttpRoute *route) |
| Create the receive request pipeline. | |
| int | httpCreateSecret(Http *http) |
| Create the Http secret data for crypto. | |
| HttpStage* | httpCreateStage(Http *http, cchar *name, int flags, MprModule *module) |
| Create a connector stage. | |
| HttpTx* | httpCreateTx(HttpConn *conn, MprHash *headers) |
| Create the tx object. | |
| void | httpCreateTxPipeline(HttpConn *conn, struct HttpRoute *route) |
| Create the transmit request pipeline. | |
| HttpUri* | httpCreateUri(cchar *uri, int complete) |
| Create and initialize a URI. | |
| HttpUri* | httpCreateUriFromParts(cchar *scheme, cchar *host, int port, cchar *path, cchar *reference, cchar *query, int complete) |
| Create a URI from parts. | |
| HttpUser* | httpCreateUser(HttpAuth *auth, cchar *name, cchar *password, cchar *realm, bool enabled) |
| Create a new user. | |
| void | httpDefaultOutgoingServiceStage(HttpQueue *q) |
| Default outgoing data handling. | |
| HttpRoute* | httpDefineRoute(HttpRoute *parent, cchar *name, cchar *methods, cchar *pattern, cchar *target, cchar *source) |
| Define a route. | |
| void | httpDefineRouteCondition(cchar *name, HttpRouteProc *proc) |
| Define a route condition rule. | |
| void | httpDefineRouteTarget(cchar *name, HttpRouteProc *proc) |
| Define a route target rule. | |
| void | httpDefineRouteUpdate(cchar *name, HttpRouteProc *proc) |
| Define a route update rule. | |
| void | httpDestroy(Http *http) |
| Destroy the Http service object. | |
| void | httpDestroyConn(HttpConn *conn) |
| Destroy the connection object. | |
| void | httpDestroyEndpoint(HttpEndpoint *endpoint) |
| Destroy the endpoint. | |
| void | httpDestroyPipeline(HttpConn *conn) |
| Destroy the pipeline. | |
| void | httpDestroyTx(HttpTx *tx) |
| Destroy the tx object. | |
| int | httpDisableGroup(HttpAuth *auth, cchar *group) |
| Disable a group. | |
| void | httpDisableQueue(HttpQueue *q) |
| Disable a queue. | |
| int | httpDisableUser(HttpAuth *auth, cchar *realm, cchar *user) |
| Disable a user. | |
| void | httpDiscardData(HttpQueue *q, bool removePackets) |
| Discard all data from the queue. | |
| void | httpDiscardTransmitData(HttpConn *conn) |
| Discard buffered transmit pipeline data. | |
| void | httpDisconnect(HttpConn *conn) |
| Disconnect the connection's socket. | |
| void | httpEaseLimits(HttpLimits *limits) |
| Ease the limits. | |
| void | httpEnableConnEvents(HttpConn *conn) |
| Enable connection events. | |
| int | httpEnableGroup(HttpAuth *auth, cchar *group) |
| Enable a group. | |
| void | httpEnableQueue(HttpQueue *q) |
| Enable a queue. | |
| void | httpEnableTraceMethod(struct HttpLimits *limits, bool on) |
| Enable use of the TRACE Http method by the object owning the limits object. | |
| void | httpEnableUpload(HttpConn *conn) |
| Enable Multipart-Mime File Upload for this request. | |
| int | httpEnableUser(HttpAuth *auth, cchar *realm, cchar *user) |
| Enable a user. | |
| void | httpError(HttpConn *conn, int status, cchar *fmt, ...) |
| Error handling for the connection. | |
| void | httpEvent(struct HttpConn *conn, MprEvent *event) |
| Http I/O event handler. | |
| void | httpFinalize(HttpConn *conn) |
| Finalize transmission of the http request. | |
| void | httpFinalizeRoute(HttpRoute *route) |
| Finalize a route. | |
| void | httpFlush(HttpConn *conn) |
| Flush tx data. | |
| bool | httpFlushQueue(HttpQueue *q, bool block) |
| Flush queue data. | |
| void | httpFollowRedirects(HttpConn *conn, bool follow) |
| Follow redirctions. | |
| void | httpFormatError(HttpConn *conn, int status, cchar *fmt, ...) |
| Format an error transmission. | |
| ssize | httpFormatResponse(HttpConn *conn, cchar *fmt, ...) |
| Format an alternate response. | |
| ssize | httpFormatResponseBody(HttpConn *conn, cchar *title, cchar *fmt, ...) |
| Format a response body. | |
| void | httpFormatResponseError(HttpConn *conn, int status, cchar *fmt, ...) |
| Format an error response body. | |
| ssize | httpFormatResponsev(HttpConn *conn, cchar *fmt, va_list args) |
| Format an alternate response. | |
| char* | httpFormatUri(cchar *scheme, cchar *host, int port, cchar *path, cchar *ref, cchar *query, int complete) |
| Format a URI. | |
| int | httpGetAsync(HttpConn *conn) |
| Get the async mode value for the connection. | |
| ssize | httpGetChunkSize(HttpConn *conn) |
| Get the preferred chunked size for transfer chunk encoding. | |
| void* | httpGetConnContext(HttpConn *conn) |
| Get the connection context object. | |
| void* | httpGetConnHost(HttpConn *conn) |
| Get the connection host object. | |
| MprOff | httpGetContentLength(HttpConn *conn) |
| Get the receive body content length. | |
| void* | httpGetContext(Http *http) |
| Get the http context object. | |
| cchar* | httpGetCookies(HttpConn *conn) |
| Get the request cookies. | |
| char* | httpGetDateString(MprPath *sbuf) |
| Get the time as an ISO date string. | |
| void* | httpGetEndpointContext(HttpEndpoint *endpoint) |
| Get the endpoint context object. | |
| cchar* | httpGetError(HttpConn *conn) |
| Get the error message associated with the last request. | |
| char* | httpGetExt(HttpConn *conn) |
| Get a URI extension. | |
| cchar* | httpGetFilePassword(HttpAuth *auth, cchar *realm, cchar *user) |
| Get the password for a user from a file-based authentication database. | |
| HttpAcl | httpGetGroupAcl(HttpAuth *auth, char *group) |
| Get the group ACL. | |
| cchar* | httpGetHeader(HttpConn *conn, cchar *key) |
| Get an rx http header. | |
| MprHash* | httpGetHeaderHash(HttpConn *conn) |
| Get the hash table of rx Http headers. | |
| char* | httpGetHeaders(HttpConn *conn) |
| Get all the request http headers. | |
| char* | httpGetHeadersFromHash(MprHash *hash) |
| Get a header string from the given hash. | |
| HttpRoute* | httpGetHostDefaultRoute(HttpHost *host) |
| Return the default route for a host. | |
| int | httpGetIntParam(HttpConn *conn, cchar *var, int defaultValue) |
| Get a form variable as an integer. | |
| int | httpGetKeepAliveCount(HttpConn *conn) |
| Get the count of Keep-Alive requests that will be used for this connection object. | |
| HttpLang* | httpGetLanguage(HttpConn *conn, MprHash *spoken, cchar *defaultLang) |
| Get the language to use for the request. | |
| cchar* | httpGetOption(MprHash *options, cchar *field, cchar *defaultValue) |
| Extract a field value from an option string. | |
| MprHash* | httpGetOptionHash(MprHash *options, cchar *field) |
| Get an option value that is itself an object (hash). | |
| MprHash* | httpGetOptions(cchar *options) |
| Convert an options string into an options table. | |
| HttpPacket* | httpGetPacket(struct HttpQueue *q) |
| Get the next packet from a queue. | |
| ssize | httpGetPacketLength(HttpPacket *packet) |
| Get the length of the packet data contents. | |
| cchar* | httpGetParam(HttpConn *conn, cchar *var, cchar *defaultValue) |
| Get a request param. | |
| MprHash* | httpGetParams(HttpConn *conn) |
| Get the request params table. | |
| char* | httpGetParamsString(HttpConn *conn) |
| Get the request params table as a string. | |
| char* | httpGetPathExt(cchar *path) |
| Get a path extension. | |
| cchar* | httpGetQueryString(HttpConn *conn) |
| Get the request query string. | |
| void* | httpGetQueueData(HttpConn *conn) |
| Get the queue data for the connection. | |
| ssize | httpGetQueueRoom(HttpQueue *q) |
| Get the room in the queue. | |
| HttpUri* | httpGetRelativeUri(HttpUri *base, HttpUri *target, int clone) |
| Get a relative URI from the base to the target. | |
| void* | httpGetRouteData(HttpRoute *route, cchar *key) |
| Get extra route data. | |
| cchar* | httpGetRouteDir(HttpRoute *route) |
| Get the route directory. | |
| cchar* | httpGetRouteMethods(HttpRoute *route) |
| Get the route method list. | |
| cvoid* | httpGetStageData(struct HttpConn *conn, cchar *key) |
| Get stage data. | |
| int | httpGetStatus(HttpConn *conn) |
| Get the response status. | |
| char* | httpGetStatusMessage(HttpConn *conn) |
| Get the Http response status message. | |
| HttpLimits* | httpGraduateLimits(HttpRoute *route) |
| Graduate the limits from the parent route. | |
| void | httpHandleOptionsTrace(struct HttpConn *conn) |
| Handle a Http Trace or Options method request. | |
| bool | httpHasNamedVirtualHosts(HttpEndpoint *endpoint) |
| Test if an endpoint has named virtual hosts. | |
| void | httpInitLimits(HttpLimits *limits, bool serverSide) |
| Initialize a limits object with default values. | |
| int | httpIsChunked(HttpConn *conn) |
| Return whether transfer chunked encoding will be used on this request. | |
| int | httpIsEndpointAsync(HttpEndpoint *endpoint) |
| Get if the endpoint is running in asynchronous mode. | |
| bool | httpIsEof(struct HttpConn *conn) |
| Test if the connection has received all incoming content. | |
| int | httpIsFinalized(HttpConn *conn) |
| Test if request has been finalized. | |
| bool | httpIsGroupEnabled(HttpAuth *auth, cchar *group) |
| Test if an authentication group is enabled. | |
| bool | httpIsPacketTooBig(struct HttpQueue *q, HttpPacket *packet) |
| Test if a packet is too big. | |
| bool | httpIsQueueEmpty(HttpQueue *q) |
| Determine if the queue is empty. | |
| bool | httpIsUserEnabled(HttpAuth *auth, cchar *realm, cchar *user) |
| Test if a user is enabled. | |
| int | httpJoinPacket(HttpPacket *packet, HttpPacket *other) |
| Join two packets. | |
| void | httpJoinPacketForService(struct HttpQueue *q, HttpPacket *packet, bool serviceQ) |
| Join a packet onto the service queue. | |
| void | httpJoinPackets(HttpQueue *q, ssize size) |
| Join the packets together. | |
| HttpUri* | httpJoinUri(HttpUri *base, int argc, HttpUri **others) |
| Join URIs. | |
| HttpUri* | httpJoinUriPath(HttpUri *result, HttpUri *base, HttpUri *other) |
| Join a URI path. | |
| char* | httpLink(HttpConn *conn, cchar *target, MprHash *options) |
| Create a URI link. | |
| int | httpLoadSsl(Http *http) |
| Load SSL. | |
| void | httpLogRoutes(HttpHost *host, bool full) |
| Show the current route table to the error log. | |
| struct HttpEndpoint* | httpLookupEndpoint(Http *http, cchar *ip, int port) |
| Lookup a listening endpoint. | |
| struct HttpHost* | httpLookupHost(Http *http, cchar *name) |
| Lookup a host by name. | |
| struct HttpHost* | httpLookupHostOnEndpoint(HttpEndpoint *endpoint, cchar *name) |
| Lookup a host name. | |
| cchar* | httpLookupMimeType(cchar *ext) |
| Get the mime type for an extension. | |
| HttpRoute* | httpLookupRoute(HttpHost *host, cchar *name) |
| Lookup a route by name. | |
| cchar* | httpLookupRouteErrorDocument(HttpRoute *route, int status) |
| Lookup an error document by HTTP status code. | |
| struct HttpStage* | httpLookupStage(Http *http, cchar *name) |
| Lookup a stage by name. | |
| void* | httpLookupStageData(Http *http, cchar *name) |
| Lookup stage data. | |
| cchar* | httpLookupStatus(Http *http, int status) |
| Lookup a Http status code. | |
| char* | httpMakePath(HttpRoute *route, cchar *path) |
| Make a filename path. | |
| HttpUri* | httpMakeUriLocal(HttpUri *uri) |
| Make a URI local. | |
| void | httpMapFile(HttpConn *conn, HttpRoute *route) |
| Map the request URI and route target to a filename. | |
| void | httpMatchHost(HttpConn *conn) |
| Match the HttpHost object that should serve this request. | |
| bool | httpMatchParam(HttpConn *conn, cchar *var, cchar *expected) |
| Match a form variable with an expected value. | |
| int | httpMatchRoute(HttpConn *conn, HttpRoute *route) |
| Match a route against the current request. | |
| void | httpMemoryError(HttpConn *conn) |
| Signal a memory allocation error. | |
| bool | httpNeedRetry(HttpConn *conn, char **url) |
| Determine if the transmission needs a transparent retry to implement authentication or redirection. | |
| void | httpNormalizeUri(HttpUri *uri) |
| Normalize a URI. | |
| char* | httpNormalizeUriPath(cchar *uri) |
| Normalize a URI. | |
| void | httpOmitBody(HttpConn *conn) |
| Tell the tx to omit sending any body. | |
| int | httpOpenQueue(HttpQueue *q, ssize chunkSize) |
| Open the queue. | |
| HttpAcl | httpParseAcl(HttpAuth *auth, cchar *acl) |
| Parse an access control list. | |
| void | httpPrepClientConn(HttpConn *conn, bool keepHeaders) |
| Prepare a client connection for a new request. | |
| void | httpPrepServerConn(HttpConn *conn) |
| Prepare a connection for a new request. | |
| void | httpProcessPipeline(HttpConn *conn) |
| Run the process pipeline stage. | |
| void | httpPutBackPacket(struct HttpQueue *q, HttpPacket *packet) |
| Put a packet back onto a queue. | |
| void | httpPutForService(struct HttpQueue *q, HttpPacket *packet, bool serviceQ) |
| Put a packet onto the service queue. | |
| void | httpPutPacket(struct HttpQueue *q, HttpPacket *packet) |
| Put a packet onto a queue. | |
| void | httpPutPacketToNext(struct HttpQueue *q, HttpPacket *packet) |
| Put a packet onto the next queue. | |
| ssize | httpRead(HttpConn *conn, char *buffer, ssize size) |
| Read rx body data. | |
| int | httpReadGroupFile(HttpAuth *auth, char *path) |
| Read an authentication group file. | |
| char* | httpReadString(HttpConn *conn) |
| Read response data as a string. | |
| int | httpReadUserFile(HttpAuth *auth, char *path) |
| Remove an authentication user file. | |
| void | httpRedirect(HttpConn *conn, int status, cchar *uri) |
| Redirect the client. | |
| void | httpRemoveAllUploadedFiles(HttpConn *conn) |
| Remove all uploaded files. | |
| int | httpRemoveGroup(HttpAuth *auth, cchar *group) |
| Remove a group. | |
| int | httpRemoveHeader(HttpConn *conn, cchar *key) |
| Remove a header from the transmission. | |
| void | httpRemoveOption(MprHash *options, cchar *field) |
| Remove an option. | |
| void | httpRemoveQueue(HttpQueue *q) |
| Remove a queue. | |
| void | httpRemoveUploadFile(HttpConn *conn, cchar *id) |
| Remove an uploaded file. | |
| int | httpRemoveUser(HttpAuth *auth, cchar *realm, cchar *user) |
| Remove a user. | |
| int | httpRemoveUserFromGroup(HttpGroup *gp, cchar *user) |
| Remove user from a group. | |
| int | httpRemoveUsersFromGroup(HttpAuth *auth, cchar *group, cchar *users) |
| Remove users from a group. | |
| void | httpResetCredentials(HttpConn *conn) |
| Reset the current security credentials. | |
| void | httpResetRoutePipeline(HttpRoute *route) |
| Reset the route pipeline. | |
| void | httpResetRoutes(HttpHost *host) |
| Reset the list of routes for the host. | |
| int | httpResizePacket(struct HttpQueue *q, HttpPacket *packet, ssize size) |
| Resize a packet. | |
| HttpUri* | httpResolveUri(HttpUri *base, int argc, HttpUri **others, bool local) |
| Resolve URIs relative to a base. | |
| void | httpRouteRequest(HttpConn *conn) |
| Route the request and select that matching route and handle to process the request. | |
| void | httpScheduleQueue(HttpQueue *q) |
| Schedule a queue. | |
| int | httpSecureEndpoint(HttpEndpoint *endpoint, struct MprSsl *ssl) |
| Secure an endpoint. | |
| int | httpSecureEndpointByName(cchar *name, struct MprSsl *ssl) |
| Secure an endpoint by name. | |
| void | httpSendEndPacket(HttpQueue *q) |
| Send an end packet. | |
| void | httpSendPackets(HttpQueue *q) |
| Send all queued packets. | |
| void | httpServiceQueue(HttpQueue *q) |
| Service a queue. | |
| bool | httpServiceQueues(HttpConn *conn) |
| Service pipeline queues to flow data. | |
| void | httpSetAsync(HttpConn *conn, int enable) |
| Set the async mode value for the connection. | |
| void | httpSetAuthAllow(HttpAuth *auth, cchar *allow) |
| Allow access by a client. | |
| void | httpSetAuthAnyValidUser(HttpAuth *auth) |
| Allow access by any valid user. | |
| void | httpSetAuthDeny(HttpAuth *auth, cchar *deny) |
| Deny access by a client. | |
| void | httpSetAuthOrder(HttpAuth *auth, int order) |
| Set the auth allow/deny order. | |
| void | httpSetAuthQop(HttpAuth *auth, cchar *qop) |
| Set the required quality of service for digest authentication. | |
| void | httpSetAuthRealm(HttpAuth *auth, cchar *realm) |
| Set the required realm for basic or digest authentication. | |
| void | httpSetAuthRequiredGroups(HttpAuth *auth, cchar *groups) |
| Define the set of required groups for basic or digest authentication. | |
| void | httpSetAuthRequiredUsers(HttpAuth *auth, cchar *users) |
| Define the set of required users for basic or digest authentication. | |
| void | httpSetAuthUser(HttpConn *conn, cchar *user) |
| Set the required user for basic or digest authentication. | |
| void | httpSetChunkSize(HttpConn *conn, ssize size) |
| Set the chunk size for transfer chunked encoding. | |
| void | httpSetConnContext(HttpConn *conn, void *context) |
| Set the connection context object. | |
| void | httpSetConnHost(HttpConn *conn, void *host) |
| Set the connection host object. | |
| void | httpSetConnNotifier(HttpConn *conn, HttpNotifier fn) |
| Define a notifier callback for this connection. | |
| void | httpSetContentLength(HttpConn *conn, MprOff length) |
| Define a content length header in the transmission. | |
| void | httpSetContentType(HttpConn *conn, cchar *mimeType) |
| Set the transmission (response) content mime type. | |
| void | httpSetContext(Http *http, void *context) |
| Set the http context object. | |
| void | httpSetCookie(HttpConn *conn, cchar *name, cchar *value, cchar *path, cchar *domain, MprTime lifespan, int flags) |
| Set a transmission cookie. | |
| void | httpSetCredentials(HttpConn *conn, cchar *user, cchar *password) |
| Set the Http credentials. | |
| void | httpSetDefaultClientHost(Http *http, cchar *host) |
| Define a default client host. | |
| void | httpSetDefaultClientPort(Http *http, int port) |
| Define a default client port. | |
| void | httpSetEndpointAddress(HttpEndpoint *endpoint, cchar *ip, int port) |
| Set the endpoint IP address. | |
| void | httpSetEndpointAsync(HttpEndpoint *endpoint, int enable) |
| Control if the endpoint is running in asynchronous mode. | |
| void | httpSetEndpointContext(HttpEndpoint *endpoint, void *context) |
| Set the endpoint context object. | |
| void | httpSetEndpointNotifier(HttpEndpoint *endpoint, HttpNotifier fn) |
| Define a notifier callback for this endpoint. | |
| void | httpSetEntityLength(HttpConn *conn, MprOff len) |
| Define the length of the transmission content. | |
| void | httpSetForkCallback(struct Http *http, MprForkCallback proc, void *arg) |
| Set the fork callback. | |
| int | httpSetGroupAcl(HttpAuth *auth, cchar *group, HttpAcl acl) |
| Set the group access control list. | |
| void | httpSetHasNamedVirtualHosts(HttpEndpoint *endpoint, bool on) |
| Control whether the endpoint has named virtual hosts. | |
| void | httpSetHeader(HttpConn *conn, cchar *key, cchar *fmt, ...) |
| Set a transmission header. | |
| void | httpSetHeaderString(HttpConn *conn, cchar *key, cchar *value) |
| Set a simple key/value transmission header. | |
| void | httpSetHeadersCallback(struct HttpConn *conn, HttpHeadersCallback fn, void *arg) |
| Define a headers callback. | |
| void | httpSetHostDefaultRoute(HttpHost *host, HttpRoute *route) |
| Set the default route for a host. | |
| void | httpSetHostHome(HttpHost *host, cchar *dir) |
| Set the home directory for a host. | |
| void | httpSetHostIpAddr(HttpHost *host, cchar *ip, int port) |
| Set the host internet address. | |
| void | httpSetHostName(HttpHost *host, cchar *name) |
| Set the host name. | |
| void | httpSetHostProtocol(HttpHost *host, cchar *protocol) |
| Set the host HTTP protocol version. | |
| void | httpSetIOCallback(struct HttpConn *conn, HttpIOCallback fn) |
| Define an I/O callback for connections. | |
| void | httpSetIntParam(HttpConn *conn, cchar *var, int value) |
| Set an integer request param value. | |
| void | httpSetKeepAliveCount(HttpConn *conn, int count) |
| Control Http Keep-Alive for the connection. | |
| void | httpSetMethod(HttpConn *conn, cchar *method) |
| Set a new HTTP method for processing. | |
| void | httpSetOption(MprHash *options, cchar *field, cchar *value) |
| Set an option. | |
| void | httpSetParam(HttpConn *conn, cchar *var, cchar *value) |
| Set a request param value. | |
| void | httpSetPipelineHandler(HttpConn *conn, HttpStage *handler) |
| Set the handler to process a client request. | |
| void | httpSetProtocol(HttpConn *conn, cchar *protocol) |
| Set the Http protocol variant for this connection. | |
| void | httpSetProxy(Http *http, cchar *host, int port) |
| Define a Http proxy host to use for all client connect requests. | |
| void | httpSetRequiredAcl(HttpAuth *auth, HttpAcl acl) |
| Set the required access control list for the authentication object. | |
| void | httpSetResponded(HttpConn *conn) |
| Set the responded flag for the request. | |
| void | httpSetRetries(HttpConn *conn, int retries) |
| Set the Http retry count. | |
| void | httpSetRouteAuth(HttpRoute *route, HttpAuth *auth) |
| Set the route authentication. | |
| void | httpSetRouteAutoDelete(HttpRoute *route, bool on) |
| Control file upload auto delete. | |
| void | httpSetRouteCompression(HttpRoute *route, int flags) |
| Contol content compression for the route. | |
| int | httpSetRouteConnector(HttpRoute *route, cchar *name) |
| Set the connector to use for a route. | |
| void | httpSetRouteData(HttpRoute *route, cchar *key, void *data) |
| Set route data. | |
| void | httpSetRouteDefaultLanguage(HttpRoute *route, cchar *language) |
| Set the default language for the route. | |
| void | httpSetRouteDir(HttpRoute *route, cchar *dir) |
| Set the route directory. | |
| void | httpSetRouteFlags(HttpRoute *route, int flags) |
| Update the route flags. | |
| int | httpSetRouteHandler(HttpRoute *route, cchar *name) |
| Set the handler to use for a route. | |
| void | httpSetRouteLog(HttpRoute *route, cchar *path, ssize size, int backup, cchar *format, int flags) |
| Configure the route access log. | |
| void | httpSetRouteMethods(HttpRoute *route, cchar *methods) |
| Define the methods for the route. | |
| void | httpSetRouteName(HttpRoute *route, cchar *name) |
| Set the route name. | |
| void | httpSetRoutePathVar(HttpRoute *route, cchar *token, cchar *value) |
| Define a path token variable. | |
| void | httpSetRoutePattern(HttpRoute *route, cchar *pattern, int flags) |
| Set the route pattern. | |
| void | httpSetRoutePrefix(HttpRoute *route, cchar *prefix) |
| Set the route prefix. | |
| void | httpSetRouteScript(HttpRoute *route, cchar *script, cchar *scriptPath) |
| Set the script to service the route. | |
| void | httpSetRouteSource(HttpRoute *route, cchar *source) |
| Set the source code module for the route. | |
| int | httpSetRouteTarget(HttpRoute *route, cchar *name, cchar *details) |
| Set a route target. | |
| void | httpSetRouteTemplate(HttpRoute *route, cchar *tplate) |
| Set the route template. | |
| void | httpSetRouteTraceFilter(HttpRoute *route, int dir, int levels[HTTP_TRACE_MAX_ITEM], ssize len, cchar *include, cchar *exclude) |
| Set the route trace filter. | |
| void | httpSetRouteWorkers(HttpRoute *route, int workers) |
| Define the maximum number of workers for a route. | |
| void | httpSetSendConnector(HttpConn *conn, cchar *path) |
| Set the "Send" connector to process the request. | |
| void | httpSetSoftware(Http *http, cchar *description) |
| Set the software description. | |
| void | httpSetStageData(struct HttpConn *conn, cchar *key, cvoid *data) |
| Set stage data. | |
| void | httpSetState(HttpConn *conn, int state) |
| Set the connection state and invoke notifiers. | |
| void | httpSetStatus(HttpConn *conn, int status) |
| Set a Http response status. | |
| void | httpSetTimeout(HttpConn *conn, int requestTimeout, int inactivityTimeout) |
| Set the Http inactivity timeout. | |
| int | httpSetUri(HttpConn *conn, cchar *uri, cchar *query) |
| Set a new URI for processing. | |
| void | httpSetWriteBlocked(HttpConn *conn) |
| Indicate that the transmission socket is blocked. | |
| int | httpShouldTrace(HttpConn *conn, int dir, int item, cchar *ext) |
| Test if the item should be traced. | |
| HttpPacket* | httpSplitPacket(HttpPacket *packet, ssize offset) |
| Split a data packet. | |
| int | httpStartEndpoint(HttpEndpoint *endpoint) |
| Start listening for client connections. | |
| void | httpStartPipeline(HttpConn *conn) |
| Start the pipeline. | |
| void | httpStopEndpoint(HttpEndpoint *endpoint) |
| Stop the server listening for client connections. | |
| char* | httpTemplate(HttpConn *conn, cchar *tplate, MprHash *options) |
| Expand a template string using given options. | |
| int | httpTestParam(HttpConn *conn, cchar *var) |
| Test if a request param is defined. | |
| bool | httpTokenize(HttpRoute *route, cchar *str, cchar *fmt, ...) |
| Tokenize a string based on route data. | |
| bool | httpTokenizev(HttpRoute *route, cchar *str, cchar *fmt, va_list args) |
| Tokenize a string based on route data. | |
| void | httpTrimExtraPath(HttpConn *conn) |
| Trim extra path from the URI. | |
| ssize | httpUpdateCache(HttpConn *conn, cchar *uri, cchar *data, MprTime lifespan) |
| Update the cached content for a URI. | |
| void | httpUpdateUserAcls(HttpAuth *auth) |
| Update the user access control list. | |
| char* | httpUriToString(HttpUri *uri, int complete) |
| Convert a Uri to a string. | |
| bool | httpValidateFileCredentials(HttpAuth *auth, cchar *realm, cchar *user, cchar *password, cchar *requiredPass, char **msg) |
| Validate credentials using a file-based authentication database. | |
| bool | httpValidateLimits(HttpEndpoint *endpoint, int event, HttpConn *conn) |
| Validate the request against defined resource limits. | |
| bool | httpVerifyQueue(HttpQueue *q) |
| Verify a queue. | |
| int | httpWait(HttpConn *conn, int state, MprTime timeout) |
| Wait for the connection to achieve the requested state Used for blocking client requests. | |
| bool | httpWillNextQueueAcceptPacket(HttpQueue *q, HttpPacket *packet) |
| Determine if the downstream queue will accept this packet. | |
| bool | httpWillNextQueueAcceptSize(HttpQueue *q, ssize size) |
| Determine if the downstream queue will accept a certain amount of data. | |
| void | httpWritable(HttpConn *conn) |
| Inform notifiers that the connection is now writable. | |
| ssize | httpWrite(HttpQueue *q, cchar *fmt, ...) |
| Write a formatted string. | |
| ssize | httpWriteBlock(HttpQueue *q, cchar *buf, ssize size) |
| Write a block of data to the queue. | |
| ssize | httpWriteCached(HttpConn *conn) |
| Write the cached content for a URI to the client. | |
| int | httpWriteGroupFile(HttpAuth *auth, char *path) |
| Write out the group authentication database. | |
| void | httpWriteHeaders(HttpConn *conn, HttpPacket *packet) |
| Write the transmission headers. | |
| void | httpWriteRouteLog(HttpRoute *route, cchar *buf, ssize len) |
| Write data to the route access log. | |
| ssize | httpWriteString(HttpQueue *q, cchar *s) |
| Write a string of data to the queue. | |
| ssize | httpWriteUploadData(HttpConn *conn, MprList *formData, MprList *fileData) |
| Write Http upload body data. | |
| int | httpWriteUserFile(HttpAuth *auth, char *path) |
| Write out the user authentication database. |
| HttpAcl | Authentication Access control mask. |
| HttpEnvCallback | Set environment vars callback. |
| HttpFillProc | Callback procedure to fill a packet with data. |
| HttpGetPassword | Lookup password callback. |
| HttpGroup | Group Authorization. |
| HttpHeadersCallback | Callback to fill headers. |
| HttpIOCallback | I/O callback for connections. |
| HttpLang | Language definition record for routes. |
| HttpListenCallback | Listen callback. |
| HttpNotifier | Connection Http state change notification callback. |
| HttpRedirectCallback | Define an callback for IO events on this connection. |
| HttpRouteOp | Route operation record. |
| HttpRouteProc | General route procedure. |
| HttpUser | User Authorization File-based authorization backend. |
| HttpValidateCred | Validate user credentials callback. |
| #define | HTTP_ADDED_FORM_PARAMS 0x1000 |
| Form body data added to params. | |
| #define | HTTP_ADDED_QUERY_PARAMS 0x800 |
| Query added to params. | |
| #define | HTTP_ALLOW_DENY 1 |
| Run allow checks before deny checks. | |
| #define | HTTP_AUTH_BASIC 1 |
| Basic HTTP authentication (clear text). | |
| #define | HTTP_AUTH_DIGEST 2 |
| Digest authentication. | |
| #define | HTTP_AUTH_METHOD_FILE 1 |
| File-based authentication. | |
| #define | HTTP_AUTH_METHOD_PAM 2 |
| Plugable authentication module scheme (Unix). | |
| #define | HTTP_AUTH_REQUIRED 0x1 |
| Route requires authentication. | |
| #define | HTTP_AUTH_UNKNOWN 0 |
| Authentication method is unknown. | |
| #define | HTTP_BUFSIZE (8 * 1024) |
| Default I/O buffer size. | |
| #define | HTTP_CACHE_ALL 0x10 |
| Cache the same pathInfo together regardless of the request params. | |
| #define | HTTP_CACHE_CLIENT 0x1 |
| Cache on the client side. | |
| #define | HTTP_CACHE_LIFESPAN (86400 * 1000) |
| Default cache lifespan to 1 day. | |
| #define | HTTP_CACHE_MANUAL 0x4 |
| Cache manually. | |
| #define | HTTP_CACHE_ONLY 0x20 |
| Cache exactly the specified URI with params. | |
| #define | HTTP_CACHE_RESET 0x8 |
| Don't inherit cache config from outer routes. | |
| #define | HTTP_CACHE_SERVER 0x2 |
| Cache on the server side. | |
| #define | HTTP_CACHE_UNIQUE 0x40 |
| Uniquely cache request with different params. | |
| #define | HTTP_CHUNK_DATA 2 |
| Start of chunk data. | |
| #define | HTTP_CHUNK_EOF 3 |
| End of last chunk. | |
| #define | HTTP_CHUNK_START 1 |
| Start of a new chunk. | |
| #define | HTTP_CHUNK_UNCHUNKED 0 |
| Data is not transfer-chunk encoded. | |
| #define | HTTP_CHUNKED 0x400 |
| Content is chunk encoded. | |
| #define | HTTP_CLIENTS_HASH (131) |
| Hash table for client IP addresses. | |
| #define | HTTP_CODE_ACCEPTED 202 |
| The request has been accepted and processing is continuing. | |
| #define | HTTP_CODE_BAD_GATEWAY 502 |
| The server cannot act as a gateway for the given request. | |
| #define | HTTP_CODE_BAD_METHOD 405 |
| The request HTTP method was not supported by the resource. | |
| #define | HTTP_CODE_BAD_REQUEST 400 |
| The request is malformed. | |
| #define | HTTP_CODE_BAD_VERSION 505 |
| The server does not support the HTTP protocol version. | |
| #define | HTTP_CODE_COMMS_ERROR 550 |
| The server had a communicationss error responding to the client. | |
| #define | HTTP_CODE_CONFLICT 409 |
| The request had a conflict in the request headers and URI. | |
| #define | HTTP_CODE_CONTINUE 100 |
| Continue with request, only partial content transmitted. | |
| #define | HTTP_CODE_CREATED 201 |
| The request has completed and a new resource was created. | |
| #define | HTTP_CODE_EXPECTATION_FAILED 417 |
| The server cannot satisfy the Expect header requirements. | |
| #define | HTTP_CODE_FORBIDDEN 403 |
| The request was legal, but the server refuses to process. | |
| #define | HTTP_CODE_GATEWAY_TIMEOUT 504 |
| The server gateway timed out waiting for the upstream server. | |
| #define | HTTP_CODE_GONE 410 |
| The requested resource is no longer available. | |
| #define | HTTP_CODE_INSUFFICIENT_STORAGE 507 |
| The server has insufficient storage to complete the request. | |
| #define | HTTP_CODE_INTERNAL_SERVER_ERROR 500 |
| Server processing or configuration error. | |
| #define | HTTP_CODE_LENGTH_REQUIRED 411 |
| The request did not specify a required content length. | |
| #define | HTTP_CODE_MOVED_PERMANENTLY 301 |
| The requested URI has moved permanently to a new location. | |
| #define | HTTP_CODE_MOVED_TEMPORARILY 302 |
| The URI has moved temporarily to a new location. | |
| #define | HTTP_CODE_NO_CONTENT 204 |
| The request has completed and there is no response to send. | |
| #define | HTTP_CODE_NO_RESPONSE 444 |
| The connection was closed with no response to the client. | |
| #define | HTTP_CODE_NOT_ACCEPTABLE 406 |
| The requested resource cannot generate the required content. | |
| #define | HTTP_CODE_NOT_AUTHORITATIVE 203 |
| The request has completed but content may be from another source. | |
| #define | HTTP_CODE_NOT_FOUND 404 |
| The requested resource was not found. | |
| #define | HTTP_CODE_NOT_IMPLEMENTED 501 |
| The server does not recognize the request or method. | |
| #define | HTTP_CODE_NOT_MODIFIED 304 |
| The requested resource has changed since the last request. | |
| #define | HTTP_CODE_OK 200 |
| The request completed successfully. | |
| #define | HTTP_CODE_PARTIAL 206 |
| The request has completed and is returning partial content. | |
| #define | HTTP_CODE_PAYMENT_REQUIRED 402 |
| Reserved for future use. | |
| #define | HTTP_CODE_PRECOND_FAILED 412 |
| The server cannot satisfy one of the request preconditions. | |
| #define | HTTP_CODE_RANGE_NOT_SATISFIABLE 416 |
| The request content range does not exist for the resource. | |
| #define | HTTP_CODE_REQUEST_TIMEOUT 408 |
| The server timed out waiting for the request to complete. | |
| #define | HTTP_CODE_REQUEST_TOO_LARGE 413 |
| The request is too large for the server to process. | |
| #define | HTTP_CODE_REQUEST_URL_TOO_LARGE 414 |
| The request URI is too long for the server to process. | |
| #define | HTTP_CODE_RESET 205 |
| The request has completed with no content. | |
| #define | HTTP_CODE_SEE_OTHER 303 |
| The requested URI can be found at another URI location. | |
| #define | HTTP_CODE_SERVICE_UNAVAILABLE 503 |
| The server is currently unavailable or overloaded. | |
| #define | HTTP_CODE_TEMPORARY_REDIRECT 307 |
| The request should be repeated at another URI location. | |
| #define | HTTP_CODE_UNAUTHORIZED 401 |
| Authentication for the request has failed. | |
| #define | HTTP_CODE_UNSUPPORTED_MEDIA_TYPE 415 |
| The request media type is not supported by the server or resource. | |
| #define | HTTP_CODE_USE_PROXY 305 |
| The requested resource must be accessed via the location proxy. | |
| #define | HTTP_COOKIE_HTTP 0x2 |
| Flag for httpSetCookie for http cookies (http only). | |
| #define | HTTP_COOKIE_SECURE 0x1 |
| Flag for httpSetCookie for secure cookies (https only). | |
| #define | HTTP_CREATE_ENV 0x100 |
| Must create env for this request. | |
| #define | HTTP_DEFAULT_MAX_THREADS 10 |
| Default number of threads. | |
| #define | HTTP_DELAY_SERVICE 0 |
| Delay servicing the queue. | |
| #define | HTTP_DELETE 0x1 |
| DELETE method. | |
| #define | HTTP_DENY_ALLOW 2 |
| Run deny checks before allow checks. | |
| #define | HTTP_EVENT_CLOSE -1 |
| Connection being closed. | |
| #define | HTTP_EVENT_IO 0 |
| I/O event on connection. | |
| #define | HTTP_GET 0x2 |
| GET method. | |
| #define | HTTP_HEAD 0x4 |
| HEAD method. | |
| #define | HTTP_HOST_NAMED_VHOST 0x2 |
| Host flag for a named virtual host. | |
| #define | HTTP_HOST_NO_TRACE 0x10 |
| Host flag to disable the of TRACE HTTP method. | |
| #define | HTTP_HOST_VHOST 0x1 |
| Host flag to signify host is a virtual host. | |
| #define | HTTP_IF_MODIFIED 0x200 |
| If-[un]modified-since supplied. | |
| #define | HTTP_INACTIVITY_TIMEOUT (60 * 1000) |
| Keep connection alive timeout. | |
| #define | HTTP_LANG_AFTER 0x2 |
| Insert suffix after extension. | |
| #define | HTTP_LANG_BEFORE 0x1 |
| Insert suffix before extension. | |
| #define | HTTP_MAX_CACHE_ITEM (256 * 1024) |
| Maximum cachable item size. | |
| #define | HTTP_MAX_CHUNK (8 * 1024) |
| Maximum chunk size for transfer chunk encoding. | |
| #define | HTTP_MAX_CLIENTS 10 |
| Maximum concurrent client endpoints. | |
| #define | HTTP_MAX_HEADERS 4096 |
| Maximum size of the headers. | |
| #define | HTTP_MAX_IOVEC 16 |
| Number of fragments in a single socket write. | |
| #define | HTTP_MAX_KEEP_ALIVE 100 |
| Maximum requests per connection. | |
| #define | HTTP_MAX_NUM_HEADERS 20 |
| Maximum number of header lines. | |
| #define | HTTP_MAX_PASS 64 |
| Size of password. | |
| #define | HTTP_MAX_QUEUE 2 |
| Number of queue types. | |
| #define | HTTP_MAX_RECEIVE_BODY (128 * 1024 * 1024) |
| Maximum incoming body size. | |
| #define | HTTP_MAX_RECEIVE_FORM (1024 * 1024) |
| Maximum incoming form size. | |
| #define | HTTP_MAX_REQUESTS 20 |
| Maximum concurrent requests. | |
| #define | HTTP_MAX_REWRITE 20 |
| Maximum URI rewrites. | |
| #define | HTTP_MAX_ROUTE_MATCHES 32 |
| Maximum number of submatches in routes. | |
| #define | HTTP_MAX_SECRET 32 |
| Size of secret data for auth. | |
| #define | HTTP_MAX_SESSIONS 100 |
| Maximum concurrent sessions. | |
| #define | HTTP_MAX_STAGE_BUFFER (32 * 1024) |
| Maximum buffer for any stage. | |
| #define | HTTP_MAX_TX_BODY (INT_MAX) |
| Maximum buffer for response data. | |
| #define | HTTP_METHOD_MASK 0xFFF |
| Method mask. | |
| #define | HTTP_NAME "Embedthis-http/" BLD_VERSION |
| Default library name used in Http headers. | |
| #define | HTTP_NAMED_VHOST 0x1 |
| Using named virtual hosting. | |
| #define | HTTP_NOTIFY_CLOSED 0x4 |
| The request is now closed. | |
| #define | HTTP_NOTIFY_ERROR 0x8 |
| The request has an error. | |
| #define | HTTP_NOTIFY_READABLE 0x1 |
| Notification flags. | |
| #define | HTTP_NOTIFY_WRITABLE 0x2 |
| The request is now writable (post / put data). | |
| #define | HTTP_OPTIONS 0x8 |
| OPTIONS method. | |
| #define | HTTP_PACKET_DATA 0x4 |
| Packet contains actual content data. | |
| #define | HTTP_PACKET_END 0x8 |
| End of stream packet. | |
| #define | HTTP_PACKET_HEADER 0x1 |
| Packet contains HTTP headers. | |
| #define | HTTP_PACKET_RANGE 0x2 |
| Packet is a range boundary packet. | |
| #define | HTTP_POST 0x10 |
| Post method. | |
| #define | HTTP_PUT 0x20 |
| PUT method. | |
| #define | HTTP_QUEUE_ALL 0x8 |
| Queue has all the data there is and will be. | |
| #define | HTTP_QUEUE_DISABLED 0x2 |
| Queue's service routine is disabled. | |
| #define | HTTP_QUEUE_EOF 0x20 |
| Queue at end of data. | |
| #define | HTTP_QUEUE_FULL 0x4 |
| Queue is full. | |
| #define | HTTP_QUEUE_OPEN 0x1 |
| Queue's open routine has been called. | |
| #define | HTTP_QUEUE_RESERVICE 0x80 |
| Queue requires reservicing. | |
| #define | HTTP_QUEUE_RX 1 |
| Receive (read from client) queue. | |
| #define | HTTP_QUEUE_SERVICED 0x10 |
| Queue has been serviced at least once. | |
| #define | HTTP_QUEUE_STARTED 0x40 |
| Queue started. | |
| #define | HTTP_QUEUE_TX 0 |
| Send (transmit to client) queue. | |
| #define | HTTP_RANGE_BUFSIZE 128 |
| Size of a range boundary. | |
| #define | HTTP_RETRIES 3 |
| Default number of retries for client requests. | |
| #define | HTTP_ROUTE_FREE 0x2 |
| Free Route.mdata back to malloc when route is freed. | |
| #define | HTTP_ROUTE_GZIP 0x2000 |
| Support gzipped content. | |
| #define | HTTP_ROUTE_NOT 0x1 |
| Negate the route pattern test result. | |
| #define | HTTP_ROUTE_OK 0 |
| The route matches the request. | |
| #define | HTTP_ROUTE_PUT_DELETE 0x1000 |
| Support PUT|DELETE. | |
| #define | HTTP_ROUTE_RAW 0x4 |
| Don't html encode the write data. | |
| #define | HTTP_ROUTE_REJECT 1 |
| The route does not match the request. | |
| #define | HTTP_ROUTE_REROUTE 2 |
| Request has been modified and must be re-routed. | |
| #define | HTTP_SESSION_TIMEOUT (3600 * 1000) |
| One hour. | |
| #define | HTTP_STAGE_ALL HTTP_METHOD_MASK |
| Mask for every possible method including custom methods. | |
| #define | HTTP_STAGE_AUTO_DIR 0x10000 |
| Want auto directory redirection. | |
| #define | HTTP_STAGE_CONNECTOR 0x1000 |
| Stage is a connector. | |
| #define | HTTP_STAGE_DELETE HTTP_DELETE |
| Support DELETE requests. | |
| #define | HTTP_STAGE_FILTER 0x4000 |
| Stage is a filter. | |
| #define | HTTP_STAGE_GET HTTP_GET |
| Support GET requests. | |
| #define | HTTP_STAGE_HANDLER 0x2000 |
| Stage is a handler. | |
| #define | HTTP_STAGE_HEAD HTTP_HEAD |
| Support HEAD requests. | |
| #define | HTTP_STAGE_METHODS (HTTP_DELETE|HTTP_GET|HTTP_HEAD|HTTP_POST|HTTP_PUT) |
| Support default methods. | |
| #define | HTTP_STAGE_MODULE 0x8000 |
| Stage is a filter. | |
| #define | HTTP_STAGE_OPTIONS HTTP_OPTIONS |
| Support OPTIONS requests. | |
| #define | HTTP_STAGE_POST HTTP_POST |
| Support POST requests. | |
| #define | HTTP_STAGE_PUT HTTP_PUT |
| Support PUT requests. | |
| #define | HTTP_STAGE_RX 0x40000 |
| Stage to be used in the Rx direction. | |
| #define | HTTP_STAGE_TRACE HTTP_TRACE |
| Support TRACE requests. | |
| #define | HTTP_STAGE_TX 0x80000 |
| Stage to be used in the Tx direction. | |
| #define | HTTP_STAGE_UNKNOWN HTTP_UNKNOWN |
| Support TRACE requests. | |
| #define | HTTP_STAGE_UNLOADED 0x20000 |
| Stage module library has been unloaded. | |
| #define | HTTP_STATE_BEGIN 1 |
| Ready for a new request. | |
| #define | HTTP_STATE_COMPLETE 7 |
| Request complete. | |
| #define | HTTP_STATE_CONNECTED 2 |
| Connection received or made. | |
| #define | HTTP_STATE_CONTENT 5 |
| Reading posted content. | |
| #define | HTTP_STATE_FIRST 3 |
| First request line has been parsed. | |
| #define | HTTP_STATE_PARSED 4 |
| Headers have been parsed, handler can start. | |
| #define | HTTP_STATE_RUNNING 6 |
| Handler running. | |
| #define | HTTP_TIMER_PERIOD 1000 |
| Timer checks ever 1 second. | |
| #define | HTTP_TRACE 0x40 |
| TRACE method. | |
| #define | HTTP_TRACE_BODY 3 |
| Body content. | |
| #define | HTTP_TRACE_CONN 0 |
| New connections. | |
| #define | HTTP_TRACE_FIRST 1 |
| First line of header only. | |
| #define | HTTP_TRACE_HEADER 2 |
| Header. | |
| #define | HTTP_TRACE_LIMITS 4 |
| Instrument http pipeline. | |
| #define | HTTP_TRACE_MAX_DIR 2 |
| Trace transmission. | |
| #define | HTTP_TRACE_RX 0 |
| Trace reception. | |
| #define | HTTP_TRACE_TIME 5 |
| Instrument http pipeline. | |
| #define | HTTP_TRACE_TX 1 |
| Trace transmission. | |
| #define | HTTP_TX_HEADERS_CREATED 0x2 |
| Response headers have been created. | |
| #define | HTTP_TX_NO_BODY 0x1 |
| No transmission body, only sent headers. | |
| #define | HTTP_TX_SENDFILE 0x4 |
| Relay output via Send connector. | |
| #define | HTTP_UNKNOWN 0x800 |
| Unknown method. | |
| #define | HTTP_VALIDATE_CLOSE_CONN 2 |
| Close a connection. | |
| #define | HTTP_VALIDATE_CLOSE_REQUEST 4 |
| Close a request. | |
| #define | HTTP_VALIDATE_OPEN_CONN 1 |
| Open a new connection. | |
| #define | HTTP_VALIDATE_OPEN_REQUEST 3 |
| Open a new request. |
Http service object.
| MprTime | booted | Time the server started. | |
| struct HttpStage * | cacheFilter | Cache filter. | |
| struct HttpStage * | cacheHandler | Cache filter. | |
| struct HttpStage * | cgiHandler | CGI listing handler. | |
| struct HttpStage * | chunkFilter | Chunked transfer encoding filter. | |
| struct HttpLimits * | clientLimits | Client resource limits. | |
| struct HttpRoute * | clientRoute | Default route for clients. | |
| int | connCount | Count of connections for Conn.seqno. | |
| MprList * | connections | Currently open connection requests. | |
| void * | context | Embedding context. | |
| char * | currentDate | Date string for HTTP response headers. | |
| char * | defaultClientHost | Default ip address. | |
| int | defaultClientPort | Default port. | |
| struct HttpStage * | dirHandler | Directory listing handler. | |
| struct HttpStage * | egiHandler | Embedded Gateway Interface (EGI) handler. | |
| struct HttpStage * | ejsHandler | Ejscript Web Framework handler. | |
| MprList * | endpoints | Currently configured listening endpoints. | |
| HttpEnvCallback | envCallback | SetEnv callback. | |
| char * | expiresDate | Convenient expiry date (1 day in advance). | |
| struct HttpStage * | fileHandler | Static file handler. | |
| MprForkCallback | forkCallback | Callback in child after fork(). | |
| HttpGetPassword | getPassword | Lookup password callback. | |
| MprList * | hosts | List of host objects. | |
| HttpListenCallback | listenCallback | Invoked when creating listeners. | |
| struct HttpStage * | netConnector | Default network connector. | |
| MprTime | now | When was the currentDate last computed. | |
| struct HttpStage * | passHandler | Pass through handler. | |
| struct HttpStage * | phpHandler | PHP through handler. | |
| char * | protocol | HTTP/1.0 or HTTP/1.1. | |
| char * | proxyHost | Proxy ip address. | |
| int | proxyPort | Proxy port. | |
| struct HttpStage * | rangeFilter | Ranged requests filter. | |
| HttpRedirectCallback | redirectCallback | Redirect callback. | |
| MprHash * | routeConditions | Http route condition functions. | |
| MprHash * | routeTargets | Http route target functions. | |
| MprHash * | routeUpdates | Http route update functions. | |
| char * | secret | Random bytes for authentication. | |
| struct HttpStage * | sendConnector | Optimized sendfile connector. | |
| struct HttpLimits * | serverLimits | Server resource limits. | |
| char * | software | Software name and version. | |
| int | sslLoaded | True when the SSL provider has been loaded. | |
| MprHash * | stages | Possible stages in connection pipelines. | |
| MprHash * | statusCodes | Http status codes. | |
| MprEvent * | timer | Admin service timer. | |
| struct HttpStage * | uploadFilter | Upload filter. | |
| HttpValidateCred | validateCred | Validate user credentials callback. |
Create a Http service object.
Create the Http secret data for crypto.
| http | Http service object. |
Destroy the Http service object.
| http | Http service object. |
Get the http context object.
| http | Http service object. |
Get the time as an ISO date string.
| sbuf | Optional path buffer. If supplied, the modified time of the path is used. If NULL, then the current time is used. |
Load SSL.
| http | Http object created via httpCreate |
Lookup a host by name.
| http | Http object created via httpCreate |
| name | The name of the host to find. |
Lookup a Http status code.
| http | Http object created via httpCreate |
| status | Http status code. |
Define a Http proxy host to use for all client connect requests.
| http | Http object created via httpCreate |
| host | Proxy host name or IP address. |
| port | Proxy host port number. |
Authorization.
| MprHash * | allow | Clients to allow. | |
| bool | anyValidUser | If any valid user will do. | |
| int | backend | Authorization method (PAM | FILE). | |
| MprHash * | deny | Clients to deny. | |
| int | flags | Authorization flags. | |
| char * | groupFile | Group authorization file. | |
| MprHash * | groups | Hash of group file. | |
| int | order | Order deny/allow, allow/deny. | |
| char * | qop | Digest Qop. | |
| HttpAcl | requiredAcl | ACL for access. | |
| char * | requiredGroups | Authorization group for access. | |
| char * | requiredRealm | Realm to use for access. | |
| char * | requiredUsers | User name for access. | |
| int | type | Kind of authorization. | |
| char * | userFile | User name authorization file. | |
| MprHash * | users | Hash of user file. |
Add a group.
| auth | Auth object allocated by httpCreateAuth. Authenticated routes typically store the reference to an auth object. |
| group | Group name to add. |
| acl | Group access control list mask. |
| enabled | Set to true to enable the group. |
Add a user.
| auth | Auth object allocated by httpCreateAuth. Authenticated routes typically store the reference to an auth object. |
| realm | Authentication realm. |
| user | User name to add. |
| password | User password. The password should not be encrypted. The backend will encrypt as required. |
| enabled | Set to true to enable the user. |
Add users to a group.
| auth | Auth object allocated by httpCreateAuth. Authenticated routes typically store the reference to an auth object. |
| group | Group name to add. |
| users | Space or comma separated list of user names. |
Add a user to a group.
| auth | Auth object allocated by httpCreateAuth. Authenticated routes typically store the reference to an auth object. |
| gp | Group object. |
| user | User name string. |
Create an authentication object.
Create a new group.
| auth | Auth object allocated by httpCreateAuth. Authenticated routes typically store the reference to an auth object. |
| name | Group name to add. |
| acl | Group access control list mask. |
| enabled | Set to true to enable the group. |
Create a new user.
| auth | Auth object allocated by httpCreateAuth. Authenticated routes typically store the reference to an auth object. |
| name | User name. |
| password | User password. The password should not be encrypted. The backend will encrypt as required. |
| realm | Authentication realm for this user. |
| enabled | Set to true to enable the user. |
Disable a group.
| auth | Auth object allocated by httpCreateAuth. Authenticated routes typically store the reference to an auth object. |
| group | Group name to disable. |
Disable a user.
| auth | Auth object allocated by httpCreateAuth. Authenticated routes typically store the reference to an auth object. |
| realm | Authentication realm for user. |
| user | User name to disable. |
Enable a group.
| auth | Auth object allocated by httpCreateAuth. Authenticated routes typically store the reference to an auth object. |
| group | User name to enable. |
Enable a user.
| auth | Auth object allocated by httpCreateAuth. Authenticated routes typically store the reference to an auth object. |
| user | User name to enable. |
| realm | Authentication realm for user. |
Get the password for a user from a file-based authentication database.
| auth | Auth object allocated by httpCreateAuth. Authenticated routes typically store the reference to an auth object. |
| realm | Authentication realm for user. |
| user | User name to examine. |
Get the group ACL.
| auth | Auth object allocated by httpCreateAuth. Authenticated routes typically store the reference to an auth object. |
| group | Group name to examine. |
Test if an authentication group is enabled.
| auth | Auth object allocated by httpCreateAuth. Authenticated routes typically store the reference to an auth object. |
| group | Group name to examine. |
Test if a user is enabled.
| auth | Auth object allocated by httpCreateAuth. Authenticated routes typically store the reference to an auth object. |
| user | User name to examine. |
| realm | Authentication realm for user. |
Parse an access control list.
| auth | Auth object allocated by httpCreateAuth. Authenticated routes typically store the reference to an auth object. |
| acl | Access control list string. |
Read an authentication group file.
| auth | Auth object allocated by httpCreateAuth. Authenticated routes typically store the reference to an auth object. |
| path | Path name of the group file. |
Remove an authentication user file.
| auth | Auth object allocated by httpCreateAuth. Authenticated routes typically store the reference to an auth object. |
| path | Path name of user file. |
Remove a group.
| auth | Auth object allocated by httpCreateAuth. Authenticated routes typically store the reference to an auth object. |
| group | Group name to remove. |
Remove a user.
| auth | Auth object allocated by httpCreateAuth. Authenticated routes typically store the reference to an auth object. |
| realm | Authentication realm of user to remove. |
| user | User name to remove. |
Remove user from a group.
| gp | Group object. |
| user | User name to remove from the group. |
Remove users from a group.
| auth | Auth object allocated by httpCreateAuth. Authenticated routes typically store the reference to an auth object. |
| group | Group name to modify. |
| users | Comma or space separate list of users to remove. |
Allow access by a client.
| auth | Authorization object allocated by httpCreateAuth. Authenticated routes typically store the reference to an auth object. |
| allow | Client to allow access. This must be an IP address string. |
Allow access by any valid user.
| auth | Authorization object allocated by httpCreateAuth. Authenticated routes typically store the reference to an auth object. |
Deny access by a client.
| auth | Authorization object allocated by httpCreateAuth. Authenticated routes typically store the reference to an auth object. |
| deny | Client to deny access. This must be an IP address string. |
Set the auth allow/deny order.
| auth | Auth object allocated by httpCreateAuth. Authenticated routes typically store the reference to an auth object. |
| order | Set to HTTP_ALLOW_DENY to run allow checks before deny checks. Set to HTTP_DENY_ALLOW to run deny checks before allow. |
Set the required quality of service for digest authentication.
| auth | Auth object allocated by httpCreateAuth. Authenticated routes typically store the reference to an auth object. |
| qop | Quality of service description. |
Set the required realm for basic or digest authentication.
| auth | Auth object allocated by httpCreateAuth. Authenticated routes typically store the reference to an auth object. |
| realm | Authentication realm. |
Define the set of required groups for basic or digest authentication.
| auth | Auth object allocated by httpCreateAuth. Authenticated routes typically store the reference to an auth object. |
| groups | Comma or space separated list of acceptable groups. |
Define the set of required users for basic or digest authentication.
| auth | Auth object allocated by httpCreateAuth. Authenticated routes typically store the reference to an auth object. |
| users | Comma or space separated list of acceptable users. |
Set the required user for basic or digest authentication.
| conn | HttpConn connection object created via $httpCreateConn auth object. |
| user | User name to set. |
Set the group access control list.
| auth | Auth object allocated by httpCreateAuth. Authenticated routes typically store the reference to an auth object. |
| group | Group name to remove. |
| acl | Group access control list mask. |
Set the required access control list for the authentication object.
| auth | Auth object allocated by httpCreateAuth. Authenticated routes typically store the reference to an auth object. |
| acl | New access control list. |
Update the user access control list.
| auth | Auth object allocated by httpCreateAuth. Authenticated routes typically store the reference to an auth object. |
Validate credentials using a file-based authentication database.
| auth | Auth object allocated by httpCreateAuth. Authenticated routes typically store the reference to an auth object. |
| realm | Authentication realm. |
| user | User name. |
| password | User password. |
| requiredPass | Required user password. |
| msg | Output parameter, error message. |
Write out the group authentication database.
| auth | Auth object allocated by httpCreateAuth. Authenticated routes typically store the reference to an auth object. |
| path | Path name for the group file. |
Write out the user authentication database.
| auth | Auth object allocated by httpCreateAuth. Authenticated routes typically store the reference to an auth object. |
| path | Path name for the user file. |
Add caching for response content.
| route | HttpRoute object. |
| methods | List of methods for which caching should be enabled. Set to a comma or space separated list of method names. Method names can be any case. Set to null or "*" for all methods. Example: "GET, POST". |
| uris | Set of URIs to cache. If the URI is set to "*" all URIs for that action are uniquely cached. If the request has POST data, the URI may include such post data in a sorted query format. E.g. {uri: /buy?item=scarf&quantity=1}. |
| extensions | List of document extensions for which caching should be enabled. Set to a comma or space separated list of extensions. Extensions should not have a period prefix. Set to null or "*" for all extensions. Example: "html, css, js". |
| types | List of document mime types for which caching should be enabled. Set to a comma or space separated list of types. The mime types are those that correspond to the document extension and NOT the content type defined by the handler serving the document. Set to null or "*" for all types. Example: "image/gif, application/x-php". |
| clientLifespan | Lifespan of client cache items in milliseconds. If not set to positive integer, the lifespan will default to the route lifespan. |
| serverLifespan | Lifespan of server cache items in milliseconds. If not set to positive integer, the lifespan will default to the route lifespan. |
| flags | Cache control flags. Select ESP_CACHE_MANUAL to enable manual mode. In manual mode, cached content will not be automatically sent. Use $httpWriteCached in the request handler to write previously cached content. Select ESP_CACHE_CLIENT to enable client-side caching. In this mode a "Cache-Control" Http header will be sent to the client with the caching "max-age". WARNING: the client will not send any request for this URI until the max-age timeout has expired. Select HTTP_CACHE_RESET to first reset existing caching configuration for this route. Select HTTP_CACHE_ALL, HTTP_CACHE_ONLY or HTTP_CACHE_UNIQUE to define the server-side caching mode. Only one of these three mode flags should be specified. If the HTTP_CACHE_ALL flag is set, the request params (query, post data, and route parameters) will be ignored and all requests for a given URI path will cache to the same cache record. Select HTTP_CACHE_UNIQUE to uniquely cache requests with different request parameters. The URIs specified in $uris should not contain any request parameters. Select HTTP_CACHE_ONLY to cache only the exact URI with parameters specified in $uris. The parameters must be in sorted www-urlencoded format. For example: /example.esp?hobby=sailing&name=john. |
Update the cached content for a URI.
| conn | HttpConn connection object. |
| uri | The request URI for which to update the cache. If using the HTTP_CACHE_ONLY flag when configuring the cached item, then the URI should contain the request parameters in sorted www-urlencoded format. |
| data | Data to cache for the URI. If you wish to cache response headers, include those at the start of the data followed by an additional new line. For example: "Content-Type: text/plain\n\nHello World\n". |
| lifespan | Lifespan in milliseconds for the cached content. |
Write the cached content for a URI to the client.
| conn | HttpConn connection object. |
Http Connections.
| int | advancing | In httpProcess (re-entrancy prevention). | |
| int | async | Connection is in async mode (non-blocking). | |
| char * | authCnonce | Digest authentication cnonce value. | |
| char * | authDomain | Authentication domain. | |
| int | authNc | Digest authentication nc value. | |
| char * | authNonce | Nonce value used in digest authentication. | |
| char * | authOpaque | Opaque value used to calculate digest session. | |
| char * | authPassword | Password credentials for authorized client requests. | |
| char * | authQop | Digest authentication qop value. | |
| char * | authRealm | Authentication realm. | |
| char * | authType | Basic or Digest. | |
| char * | authUser | User name credentials for authorized client requests. | |
| char * | boundary | File upload boundary. | |
| int | canProceed | State machine should continue to process the request. | |
| int | connectorComplete | Connector has finished sending the response. | |
| HttpQueue * | connectorq | Connector write queue. | |
| int | connError | A connection error has occurred. | |
| void * | context | Embedding context (EjsRequest). | |
| struct HttpQueue * | currentq | Current queue being serviced (just for GC). | |
| void * | data | Custom data for request. | |
| MprDispatcher * | dispatcher | Event dispatcher. | |
| void * | ejs | Embedding VM. | |
| struct HttpEndpoint * | endpoint | Endpoint object (if set - indicates server-side). | |
| int | error | A request error has occurred. | |
| char * | errorMsg | Error message for the last request (if any). | |
| int | finalized | End of response has been signified (set at handler level). | |
| int | followRedirects | Follow redirects for client requests. | |
| void * | grid | Current request database grid for MVC apps. | |
| HttpHeadersCallback | headersCallback | Callback to fill headers. | |
| void * | headersCallbackArg | Arg to fillHeaders. | |
| struct HttpHost * | host | Host object (if relevant). | |
| Http * | http | Http service object. | |
| int | http10 | Using legacy HTTP/1.0. | |
| HttpPacket * | input | Header packet. | |
| HttpIOCallback | ioCallback | I/O event callback. | |
| char * | ip | Remote client IP address. | |
| int | keepAliveCount | Count of remaining Keep-Alive requests for this connection. | |
| MprTime | lastActivity | Last activity on the connection. | |
| HttpLimits * | limits | Service limits. | |
| void * | mark | Reference for GC marking. | |
| MprDispatcher * | newDispatcher | New dispatcher if using a worker thread. | |
| HttpNotifier | notifier | Connection Http state change notification callback. | |
| MprDispatcher * | oldDispatcher | Original dispatcher if using a worker thread. | |
| void * | pool | Pool of VMs. | |
| int | port | Remote port. | |
| char * | protocol | HTTP protocol. | |
| HttpQueue * | readq | End of the read pipeline. | |
| void * | record | Current request database record for MVC apps. | |
| int | refinalize | Finalize required once the Tx pipeline is created. | |
| int | responded | The request has started to respond. Some output has been initiated. | |
| int | retries | Client request retries. | |
| struct HttpRx * | rx | Rx object. | |
| int | secure | Using https. | |
| int | sentCredentials | Sent authorization credentials. | |
| int | seqno | Unique connection sequence number. | |
| struct HttpQueue * | serviceq | List of queues that require service for request pipeline. | |
| MprSocket * | sock | Underlying socket handle. | |
| MprHash * | stages | Stages in pipeline. | |
| MprTime | started | When the connection started. | |
| int | state | Connection state. | |
| MprEvent * | timeoutEvent | Connection or request timeout event. | |
| HttpTrace | trace[2] | Tracing for [rx|tx]. | |
| struct HttpTx * | tx | Tx object. | |
| MprWaitHandler * | waitHandler | I/O wait handler. | |
| int | worker | Use worker. | |
| MprEvent * | workerEvent | Event for running connection via a worker thread. | |
| int | writeBlocked | Transmission writing is blocked. | |
| HttpQueue * | writeq | Start of the write pipeline. |
Call httpEvent with the given event mask.
| conn | HttpConn object created via $httpCreateConn. |
| mask | Mask of events. MPR_READABLE | MPR_WRITABLE. |
Close a connection.
| conn | HttpConn object created via $httpCreateConn. |
Connector has completed sending the response.
| conn | HttpConn object created via $httpCreateConn. |
Signal a connection timeout on a connection.
| conn | HttpConn connection object created via $httpCreateConn. |
Consume leftover data from the last request.
| conn | HttpConn object created via $httpCreateConn. |
Create a connection object.
| http | Http object created via httpCreate |
| endpoint | Endpoint object owning the connection. |
| dispatcher | Disptacher to use for I/O events on the connection. |
Create the receive request pipeline.
| conn | HttpConn object created via $httpCreateConn. |
| route | Route object controlling how the pipeline is configured for the request. |
Create the transmit request pipeline.
| conn | HttpConn object created via $httpCreateConn. |
| route | Route object controlling how the pipeline is configured for the request. |
Destroy the connection object.
| conn | HttpConn object created via $httpCreateConn. |
Destroy the pipeline.
| conn | HttpConn object created via $httpCreateConn. |
Discard buffered transmit pipeline data.
| conn | HttpConn object created via $httpCreateConn. |
Disconnect the connection's socket.
| conn | HttpConn connection object created via $httpCreateConn. |
Enable connection events.
| conn | HttpConn connection object created via $httpCreateConn. |
Enable Multipart-Mime File Upload for this request.
This will define a "Content-Type: multipart/form-data..." header and will create a mime content boundary for use to delimit the various upload content files and fields| conn | HttpConn connection object. |
Error handling for the connection.
| conn | HttpConn connection object created via $httpCreateConn. |
| status | Http status code. |
| fmt | Printf style formatted string. |
| ... | Arguments for fmt. |
Http I/O event handler.
Invoke when there is an I/O event on the connection. This is normally invoked automatically when I/O events are received| conn | HttpConn object created via $httpCreateConn. |
| event | Event structure. |
Get the async mode value for the connection.
| conn | HttpConn object created via $httpCreateConn. |
Get the preferred chunked size for transfer chunk encoding.
| conn | HttpConn connection object created via $httpCreateConn. |
Get the connection context object.
| conn | HttpConn object created via $httpCreateConn. |
Get the connection host object.
| conn | HttpConn object created via $httpCreateConn. |
Get the error message associated with the last request.
| conn | HttpConn connection object created via $httpCreateConn. |
Get a URI extension.
| conn | HttpConn connection object created via $httpCreateConn. |
Get the count of Keep-Alive requests that will be used for this connection object.
| conn | HttpConn connection object created via $httpCreateConn. |
Match the HttpHost object that should serve this request.
| conn | HttpConn connection object created via $httpCreateConn. |
Signal a memory allocation error.
| conn | HttpConn connection object created via $httpCreateConn. |
Prepare a client connection for a new request.
| conn | HttpConn object created via $httpCreateConn. |
| keepHeaders | If true, keep the headers already defined on the connection object. |
Prepare a connection for a new request.
This is used internally when using Keep-Alive| conn | HttpConn object created via $httpCreateConn. |
Run the process pipeline stage.
| conn | HttpConn object created via $httpCreateConn. |
Reset the current security credentials.
| conn | HttpConn connection object created via $httpCreateConn. |
Route the request and select that matching route and handle to process the request.
| conn | HttpConn connection object created via $httpCreateConn. |
Set the async mode value for the connection.
| conn | HttpConn object created via $httpCreateConn. |
| enable | Set to 1 to enable async mode. |
Set the chunk size for transfer chunked encoding.
When set, a "Transfer-Encoding: Chunked" header will be added to the request, and all write data will be broken into chunks of the requested size| conn | HttpConn connection object created via $httpCreateConn. |
| size | Requested chunk size. |
Set the connection context object.
| conn | HttpConn object created via $httpCreateConn. |
| context | New context object. |
Set the connection host object.
| conn | HttpConn object created via $httpCreateConn. |
| host | New context host. |
Define a notifier callback for this connection.
| conn | HttpConn connection object created via $httpCreateConn. |
| fn | Notifier function. |
Set the Http credentials.
| conn | HttpConn connection object created via $httpCreateConn. |
| user | String user. |
| password | Decrypted password string. |
Define a default client host.
| http | Http object created via $httpCreateConn. |
| host | Host or IP address. |
Define a default client port.
| http | Http object created via $httpCreateConn. |
| port | Integer port number. |
Define a notifier callback for this endpoint.
| endpoint | HttpEndpoint object created via httpCreateEndpoint |
| fn | Notifier function. |
Set the fork callback.
| http | Http service object. |
| proc | Fork callback procedure. |
| arg | Argument to supply when the callback is invoked. |
Define a headers callback.
| conn | HttpConn object created via $httpCreateConn. |
| fn | Callback function to invoke. |
| arg | Argument to provide when invoking the headers callback. |
Define an I/O callback for connections.
| conn | HttpConn object created via $httpCreateConn. |
| fn | Callback function to invoke. |
Control Http Keep-Alive for the connection.
| conn | HttpConn connection object created via $httpCreateConn. |
| count | Count of Keep-Alive transactions to use before closing the connection. Set to zero to disable keep-alive. |
Set the handler to process a client request.
| conn | HttpConn connection object created via $httpCreateConn. |
| handler | Stage handler to process the request. |
Set the Http protocol variant for this connection.
| conn | HttpConn connection object created via $httpCreateConn. |
| protocol | String representing the protocol variant. Valid values are: "HTTP/1.0", "HTTP/1.1". This parameter must be persistent. Use HTTP/1.1 wherever possible. |
Set the Http retry count.
| conn | HttpConn object created via $httpCreateConn. |
| retries | Count of retries. |
Set the "Send" connector to process the request.
| conn | HttpConn connection object created via $httpCreateConn. |
| path | File name to send as a response. |
Set the connection state and invoke notifiers.
| conn | HttpConn object created via $httpCreateConn. |
| state | New state to enter. |
Set the Http inactivity timeout.
| conn | HttpConn object created via $httpCreateConn. |
| requestTimeout | Request timeout in msec. This is the total time for the request. |
| inactivityTimeout | Inactivity timeout in msec. This is maximum connection idle time. |
Test if the item should be traced.
| conn | HttpConn connection object created via $httpCreateConn. |
| dir | Direction of data flow. Set to HTTP_TRACE_RX or HTTP_TRACE_TX. |
| item | Item to trace. Set to HTTP_TRACE_CONN, HTTP_TRACE_FIRST, HTTP_TRACE_HEADER, HTTP_TRACE_BODY, or HTTP_TRACE_TIME. |
| ext | URI resource extension (without "."). |
Start the pipeline.
This starts the request handler| conn | HttpConn object created via $httpCreateConn. |
Inform notifiers that the connection is now writable.
| conn | HttpConn object created via $httpCreateConn. |
Write Http upload body data.
| conn | Http connection object created via $httpCreateConn. |
| fileData | List of string file names to upload. |
| formData | List of strings containing "key=value" pairs. The form data should be already www-urlencoded. |
Listening endpoints.
| int | async | Listening is in async mode (non-blocking). | |
| int | clientCount | Count of current active clients. | |
| MprHash * | clientLoad | Table of active client IPs and connection counts. | |
| void * | context | Embedding context. | |
| MprDispatcher * | dispatcher | Event dispatcher. | |
| int | flags | Endpoint control flags. | |
| MprList * | hosts | List of host objects. | |
| Http * | http | Http service object. | |
| char * | ip | Listen IP address. May be null if listening on all interfaces. | |
| HttpLimits * | limits | Alias for first host, default route resource limits. | |
| HttpNotifier | notifier | Default connection notifier callback. | |
| int | port | Listen port. | |
| int | requestCount | Count of current active requests. | |
| MprSocket * | sock | Listening socket. | |
| struct MprSsl * | ssl | Endpoint SSL configuration. | |
| MprWaitHandler * | waitHandler | I/O wait handler. |
Add a host to an endpoint.
| endpoint | Endpoint to which the host will be added. |
| host | HttpHost object to add. |
Configure endpoints with named virtual hosts.
| http | Http service object. |
| ip | IP address for the named virtual host. |
| port | address for the named virtual host. |
Create an endpoint object.
| ip | IP address on which to listen. |
| port | IP port number. |
| dispatcher | Dispatcher to use. Can be null. |
Destroy the endpoint.
| endpoint | HttpEndpoint object returned from httpCreateEndpoint |
Test if an endpoint has named virtual hosts.
| endpoint | Endpoint object to examine. |
Control whether the endpoint has named virtual hosts.
| endpoint | Endpoint object to examine. |
| on | Set to true to enable named virtual hosts. |
Start listening for client connections.
| endpoint | HttpEndpoint object created via httpCreateEndpoint |
Stop the server listening for client connections.
| endpoint | HttpEndpoint object created via httpCreateEndpoint |
Host Object.
| HttpRoute * | defaultRoute | Default route for the host. | |
| int | flags | Host flags. | |
| char * | home | Directory for configuration files. | |
| char * | ip | Hostname/ip portion parsed from name. | |
| MprMutex * | mutex | Multithread sync. | |
| char * | name | Host name. | |
| struct HttpHost * | parent | Parent host to inherit aliases, dirs, routes. | |
| int | port | Port address portion parsed from name. | |
| char * | protocol | Defaults to "HTTP/1.1". | |
| MprCache * | responseCache | Response content caching store. | |
| MprList * | routes | List of Route defintions. |
Add a route to a host.
| host | HttpHost object. |
| route | Route to add. |
Clone a host.
| parent | Parent HttpHost object to clone. |
Create a host.
Reset the list of routes for the host.
| host | HttpHost object. |
Set the home directory for a host.
| host | HttpHost object. |
| dir | Directory path for the host home. |
Set the host internet address.
| host | HttpHost object. |
| ip | Internet address. This can be an IP address or a symbolic domain and host name. |
| port | Port number. |
Set the host name.
| host | HttpHost object. |
| name | Host name to use. |
Set the host HTTP protocol version.
| host | HttpHost object. |
| protocol | Set to either HTTP/1.0 or HTTP/1.1. |
Http limits.
| ssize | cacheItemSize | Maximum size of a cachable item. | |
| ssize | chunkSize | Maximum chunk size for transfer encoding. | |
| int | clientCount | Maximum number of simultaneous clients endpoints. | |
| int | enableTraceMethod | Trace method enabled. | |
| int | headerCount | Maximum number of header lines. | |
| ssize | headerSize | Maximum size of the total header. | |
| MprTime | inactivityTimeout | Default timeout for keep-alive and idle requests (msec). | |
| int | keepAliveCount | Maximum number of Keep-Alive requests to perform per socket. | |
| MprOff | receiveBodySize | Maximum size of receive body data. | |
| MprOff | receiveFormSize | Maximum size of form data. | |
| int | requestCount | Maximum number of simultaneous concurrent requests. | |
| MprTime | requestTimeout | Default time a request can take (msec). | |
| MprTime | sessionTimeout | Default time a session can persist (msec). | |
| ssize | stageBufferSize | Maximum buffering by any pipeline stage. | |
| MprOff | transmissionBodySize | Maximum size of transmission body content. | |
| MprOff | uploadSize | Maximum size of an uploaded file. | |
| ssize | uriSize | Maximum size of a uri. |
Create a new limits object.
| serverSide | Set to "true" for server side limits. Set to "false" for client side default limits. |
Ease the limits.
| limits | Limits object. This can be either HttpHost.limits HttpConn.limits or HttpEndpoint.limits. |
Enable use of the TRACE Http method by the object owning the limits object.
| limits | Limits. |
| on | Set to true to enable the trace method. |
| on | Set to 1 to enable. |
Initialize a limits object with default values.
| limits | Limits object to modify. |
| serverSide | Set to "true" for server side limits. Set to "false" for client side default limits. |
Packet object.
| MprBuf * | content | Chunk content. | |
| MprOff | epos | Data position in entity (file). | |
| MprOff | esize | Data size in entity (file). | |
| HttpFillProc | fill | Callback to fill packet with data. | |
| int | flags | Packet flags. | |
| struct HttpPacket * | next | Next packet in chain. | |
| MprBuf * | prefix | Prefix message to be emitted before the content. |
Clone a packet.
| orig | Original packet to clone. |
Create a data packet.
| size | Size of the package data storage. |
Create an eof packet.
Create an entity data packet.
| pos | Position within the entity for packet data. |
| size | Size of the entity data. |
| fill | HttpFillProc callback to supply the entity data. |
Create a response header packet.
Create a data packet.
| size | Size of the package data storage. |
Get the length of the packet data contents.
| packet | Packet to examine. |
Join two packets.
| packet | Destination packet. |
| other | Other packet to copy data from. |
Split a data packet.
| packet | Packet to split. |
| offset | Route in the original packet at which to split. |
Queue object.
| HttpQueueClose | close | Close the queue. | |
| struct HttpConn * | conn | Connection owning this queue. | |
| ssize | count | Bytes in queue (Does not include virt packet data). | |
| int | direction | Flow direction. | |
| HttpPacket * | first | First packet in queue (singly linked). | |
| int | flags | Queue flags. | |
| MprOff | ioCount | Count of bytes in iovec including file I/O. | |
| int | ioFile | Sending a file. | |
| int | ioIndex | Next index into iovec. | |
| MprOff | ioPos | Position in file for sendfile. | |
| HttpPacket * | last | Last packet in queue (tail pointer). | |
| ssize | low | Low water mark for flow control. | |
| ssize | max | Maxiumum queue size. | |
| struct HttpQueue * | nextQ | Downstream queue for next stage. | |
| HttpQueueOpen | open | Open the queue. | |
| cchar * | owner | Name of owning stage. | |
| ssize | packetSize | Maximum acceptable packet size. | |
| struct HttpQueue * | pair | Queue for the same stage in the opposite direction. | |
| struct HttpQueue * | prevQ | Upstream queue for prior stage. | |
| HttpQueueData | put | Put a message on the queue. | |
| void * | queueData | Stage instance data. | |
| struct HttpQueue * | scheduleNext | Next linkage when queue is on the service queue. | |
| struct HttpQueue * | schedulePrev | Previous linkage when queue is on the service queue. | |
| HttpQueueService | service | Service the queue. | |
| int | servicing | Currently being serviced. | |
| struct HttpStage * | stage | Stage owning this queue. | |
| HttpQueueStart | start | Start the queue. |
Disable a queue.
| q | Queue reference. |
Discard all data from the queue.
| q | Queue reference. |
| removePackets | If "true", the data packets will be removed from the queue. |
Enable a queue.
| q | Queue reference. |
Get the next packet from a queue.
| q | Queue reference. |
Get the room in the queue.
| q | Queue reference. |
Test if the connection has received all incoming content.
| conn | HttpConn object created via $httpCreateConn. |
Test if a packet is too big.
| q | Queue reference. |
| packet | Packet to test. |
Determine if the queue is empty.
| q | Queue reference. |
Join a packet onto the service queue.
| q | Queue reference. |
| packet | Packet to join to the queue. |
| serviceQ | If true, schedule the queue for service. |
Join the packets together.
| q | Queue to examine. |
| size | The maximum-sized packet that will be created by joining queue packets is the minimum of the given size and the downstream queues maximum packet size. |
Put a packet back onto a queue.
| q | Queue reference. |
| packet | Packet to put back. |
Put a packet onto the service queue.
| q | Queue reference. |
| packet | Packet to join to the queue. |
| serviceQ | If true, schedule the queue for service. |
Put a packet onto a queue.
| q | Queue reference. |
| packet | Packet to put. |
Put a packet onto the next queue.
| q | Queue reference. The packet will not be queued on this queue, but rather on the queue downstream. |
| packet | Packet to put. |
Remove a queue.
| q | Queue reference. |
Resize a packet.
| q | Queue reference. |
| packet | Packet to put. |
| size | If size is > 0, then also ensure the packet is not larger than this size. |
Schedule a queue.
| q | Queue reference. |
Send an end packet.
| q | Queue reference. |
Send all queued packets.
| q | Queue reference. |
Service a queue.
| q | Queue reference. |
Determine if the downstream queue will accept this packet.
| q | Queue reference. |
| packet | Packet to put. |
Determine if the downstream queue will accept a certain amount of data.
| q | Queue reference. |
| size | Size of data to test for. |
Write a formatted string.
| q | Queue reference. |
| fmt | Printf style formatted string. |
| ... | Arguments for fmt. |
Write a block of data to the queue.
| q | Queue reference. |
| buf | Buffer containing the write data. |
| size | of the data in buf. |
Write a string of data to the queue.
Write a safe string of data to the queue| q | Queue reference. |
| s | String containing the data to write. |
| q | Queue reference. |
| s | String containing the data to write. |
Content range structure.
Route Control.
| HttpAuth * | auth | Per route block authentication. | |
| int | autoDelete | Automatically delete uploaded files. | |
| MprList * | caching | Items to cache. | |
| MprList * | conditions | Route conditions. | |
| HttpStage * | connector | Network connector to use. | |
| void * | context | Hosting context (Appweb == EjsPool). | |
| MprHash * | data | Hash of extra data configuration. | |
| char * | defaultLanguage | Default language. | |
| char * | dir | Directory filename. | |
| void * | eroute | Extended route information for handler (only). | |
| MprHash * | errorDocuments | Set of error documents to use on errors. | |
| MprHash * | extensions | Hash of handlers by extensions. | |
| int | flags | Route flags. | |
| HttpStage * | handler | Fixed handler. | |
| MprList * | handlers | List of handlers for this route. | |
| MprList * | handlersWithMatch | List of handlers with match routines. | |
| MprList * | headers | Matching header values. | |
| struct HttpHost * | host | Owning host. | |
| Http * | http | Http service object (copy of appweb->http). | |
| MprList * | indicies | Directory index documents. | |
| MprList * | inputStages | Input stages. | |
| MprHash * | languages | Languages supported. | |
| MprTime | lifespan | Default lifespan for all cache items in route. | |
| HttpLimits * | limits | Host resource limits. | |
| MprFile * | log | File object for access logging. | |
| int | logBackup | Number of log backups. | |
| int | logFlags | Log control flags (append|anew). | |
| char * | logFormat | Access log format. | |
| char * | logPath | Access log filename. | |
| ssize | logSize | Max log size. | |
| MprHash * | methods | Matching HTTP methods. | |
| char * | methodSpec | Supported HTTP methods. | |
| MprHash * | mimeTypes | Hash table of mime types (key is extension). | |
| char * | name | Route name. | |
| int | nextGroup | Next route with a different startWith. | |
| char * | optimizedPattern | Processed pattern (excludes prefix). | |
| MprList * | outputStages | Output stages. | |
| MprList * | params | Matching param field data. | |
| struct HttpRoute * | parent | Parent route. | |
| MprHash * | pathTokens | Path $token refrerences. | |
| char * | pattern | Original matching URI pattern for the route (includes prefix). | |
| void * | patternCompiled | Compiled pattern regular expression (not alloced). | |
| char * | prefix | Application scriptName prefix. | |
| ssize | prefixLen | Prefix length. | |
| int | responseStatus | Response status code. | |
| char * | script | Startup script for handlers serving this route. | |
| char * | scriptPath | Startup script path for handlers serving this route. | |
| char * | sourceName | Source name for route target. | |
| char * | sourcePath | Source path for route target. | |
| struct MprSsl * | ssl | SSL configuration. | |
| char * | startSegment | Starting literal segment of pattern (includes prefix). | |
| ssize | startSegmentLen | Prefix length. | |
| char * | startWith | Starting literal segment of pattern (includes prefix). | |
| ssize | startWithLen | Length of startWith. | |
| char * | target | Route target details. | |
| char * | targetRule | Target rule. | |
| MprList * | tokens | Tokens in pattern, {name}. | |
| char * | tplate | URI template for forming links based on this route (includes prefix). | |
| HttpTrace | trace[2] | Default route request tracing. | |
| int | traceMask | Request/response trace mask. | |
| MprList * | updates | Route and request updates. | |
| char * | uploadDir | Upload directory. | |
| int | workers | Number of workers to use for this route. |
Add a route for the home page.
| Name | Method | Pattern | Target |
| home | GET,POST,PUT | ^/$ | index.esp |
| parent | Parent route from which to inherit configuration. |
Add routes for a resource.
| Name | Method | Pattern | Action |
| init | GET | /NAME/init$ | init |
| create | POST | /NAME(/)*$ | create |
| edit | GET | /NAME/edit$ | edit |
| show | GET | /NAME$ | show |
| update | PUT | /NAME$ | update |
| destroy | DELETE | /NAME$ | destroy |
| default | * | /NAME/{action}$ | cmd-${action} |
| parent | Parent route from which to inherit configuration. |
| resource | Resource name. This should be a lower case, single word, alphabetic resource name. |
Add routes for a group of resources.
| Name | Method | Pattern | Action |
| list | GET | /NAME(/)*$ | list |
| init | GET | /NAME/init$ | init |
| create | POST | /NAME(/)*$ | create |
| edit | GET | /NAME/{id=[0-9]+}/edit$ | edit |
| show | GET | /NAME/{id=[0-9]+}$ | show |
| update | PUT | /NAME/{id=[0-9]+}$ | update |
| destroy | DELETE | /NAME/{id=[0-9]+}$ | destroy |
| custom | POST | /NAME/{action}/{id=[0-9]+}$ | ${action} |
| default | * | /NAME/{action}$ | cmd-${action} |
| parent | Parent route from which to inherit configuration. |
| resource | Resource name. This should be a lower case, single word, alphabetic resource name. |
Add a route condition.
| route | Route to modify. |
| name | Condition rule to add. Supported conditions are: "auth", "missing", "directory", "exists", and "match". The "auth" rule is used internally to implement basic and digest authentication. The "missing" rule tests if the target filename is missing. The "missing" rule takes no arguments. The "directory" rule tests if the condition argument is a directory. The form of the "directory" rule is: "directory pathString". For example: "directory /stuff/${request:pathInfo}.txt" The "exists" rule tests if the condition argument is present in the file system. The form of the "exists" rule is: "exists pathString". For example: "exists ${request.filename}.gz", The match directory tests a regular expression pattern against the rest of the condition arguments. The form of the match rule is: "match RegExp string". For example: "match https ${request.scheme}". |
| details | Condition parameters. See httpSetRouteTarget for a list of the token values that can be included in the condition rule details. |
| flags | Set to HTTP_ROUTE_NOT to negate the condition test. |
Add an error document.
| route | Route to modify. |
| status | The HTTP status code to use with the error document. |
| uri | URL describing the error document. |
Cache response content in the client by extension.
| route | Route to modify. |
| when | Time to expire the item. Use mprGetTime() + milliseconds. |
| extensions | Space or comma separated list of request extensions for which the content should be cached in the client. |
Cache response content in the client by mime type.
Add client cache expiry definitions to the route| route | Route to modify. |
| when | Time to expire the item. Use mprGetTime() + milliseconds. |
| mimeTypes | Space or command separated list of response mime types for which the content should be cached in the client. |
Add a route filter.
| route | Route to modify. |
| name | Filter name to add. |
| extensions | Request extensions for which the filter will be run. A request extension may come from the URI if present or from the corresponding filename. |
| direction | Set to HTTP_STAGE_TX for transmit direction and HTTP_STAGE_RX for receive data flow. |
Add a route handler.
| route | Route to modify. |
| name | Filter name to add. |
| extensions | Request extensions for which the handler will be selected. A request extension may come from the URI if present or from the corresponding filename. |
Add a route header check.
| route | Route to modify. |
| header | Header field to interrogate. |
| value | Header value that will match. |
| flags | Set to HTTP_ROUTE_NOT to negate the header test. |
Set the route index document.
| route | Route to modify. |
| path | Path name to the index document. If the path is a relative path, it may be joined to the route directory to create an absolute path. |
Add a route language directory.
| route | Route to modify. |
| language | Language symbolic name. For example: "en" for english. |
| path | File system directory to contain content for matching requests. |
Add a route language suffix.
| route | Route to modify. |
| language | Language symbolic name. For example: "en" for english. |
| suffix | Extension suffix to add when creating filenames for the request. For example: "fr" to add to "index.html" could produce: "index.fr.html". |
| flags | Set to HTTP_LANG_BEFORE to insert the suffix before the filename extension. Set to HTTP_LANG_AFTER to append after the extension. For example: HTTP_LANG_AFTER would produce "index.html.fr". |
Add a route param check.
| route | Route to modify. |
| field | Param field to interrogate. |
| value | Header value that will match. |
| flags | Set to HTTP_ROUTE_NOT to negate the query test. |
Add a route set package.
| Name | Method | Pattern | Target |
| home | GET,POST,PUT | ^/$ | index.esp |
| static | GET | ^/static(/(.)*$ | $1 |
| parent | Parent route from which to inherit configuration. | ||||||||
| set | Route set to select. Use "simple", "mvc", "restful" or "none". The "simple" pack will invoke httpAddHomeRoute and httpAddStaticRoute to add "home", and "static" routes. The "mvc" selection will add the default routes and then add the route:
|
Add a route update rule.
| route | Route to modify. |
| name | Update rule to add. Supported update rules include: "cmd", "field" and "lang". The "cmd" rule is used to run external commands. For example: "cmd touch /tmp/filename". The "param" rule is used to set values in the request param fields. For example: "param priority high". The "lang" update rule is used internally to implement the various language options. See httpSetRouteTarget for a list of the token values that can be included in the condition rule details. |
| details | Update rule parameters. |
| flags | Reserved. |
Add a route for static content under a "static" directory.
This can be used for ESP applications. Use the EspDir appweb configuration file directive to modify the "static" directory| Name | Method | Pattern | Target |
| static | GET | ^/static(/(.)*$ | $1 |
| parent | Parent route from which to inherit configuration. |
Backup the route log if required.
| route | Route to modify. |
Clear the pipeline stages for the route.
| route | Route to modify. |
| direction | Set to HTTP_STAGE_TX for transmit direction and HTTP_STAGE_RX for receive data flow. |
Create a route suitable for use as an alias.
| parent | Parent route to inherit from. |
| pattern | Pattern to match URIs. |
| path | File system directory containing documents for this route. |
| status | Http redirect status for matching requests. Set to zero if not using redirects. |
Create a configured route.
| host | HttpHost object owning the route. |
| serverSide | Set to "true" if this is a server side route. Set to "false" for client side. |
Create a default route for a host.
| host | HttpHost object owning the route. |
Create a route inherited from a parent route.
| route | Parent route from which to inherit. |
Create a route for a host.
| host | HttpHost object owning the route. |
Define a route.
| parent | Parent route from which to inherit configuration. |
| name | Route name to define. |
| methods | Http methods for which this route is active. |
| pattern | Matching URI pattern for which this route will qualify. |
| target | Route target string expression. This is used by handlers to determine the physical or virtual resource to serve. |
| source | Source file pattern containing the resource to activate or serve. |
Define a route condition rule.
| name | Condition name. |
| proc | Condition function to process the condition during route matching. |
Define a route target rule.
| name | Target name. |
| proc | Target function to process the target during route matching. |
Define a route update rule.
| name | Update name. |
| proc | Update function to process the update during route matching. |
Finalize a route.
| route | Route to modify. |
Return the default route for a host.
| host | Host to examine. |
Get an option value that is itself an object (hash).
| options | Options object to examine. |
| field | Property to return. |
Get extra route data.
| route | Route to modify. |
| key | Unique string key to identify the data. |
Get the route directory.
| route | Route to modify. |
Get the route method list.
| route | Route to examine. |
Graduate the limits from the parent route.
| route | Route to modify. |
Show the current route table to the error log.
| host | Host to examine. |
| full | Set to true for a "fuller" output route description. |
Lookup an error document by HTTP status code.
| route | Route to modify. |
| status | HTTP status code integer. |
Make a filename path.
| route | Route to modify. |
| path | Path name to examine. |
Match a route against the current request.
| conn | HttpConn connection object. |
| route | Route to modify. |
Remove an option.
| options | Options table returned from httpGetOptions. |
| field | Property field to remove. |
Reset the route pipeline.
| route | Route to modify. |
Set the default route for a host.
| host | Host to examine. |
| route | Route to define as the default. |
Set an option.
| options | Options table returned from httpGetOptions. |
| field | Property field to set. |
| value | Property value to use. |
Set the route authentication.
| route | Route to modify. |
| auth | Authentication object. |
Control file upload auto delete.
| route | Route to modify. |
| on | Set to true to enable auto-delete. Auto-delete is enabled by default. |
Contol content compression for the route.
| route | Route to modify. |
| flags | Set to HTTP_ROUTE_GZIP to enable the fileHandler to serve eqivalent compressed content with a "gz" extension. |
Set the connector to use for a route.
| route | Route to modify. |
| name | Connector name to use for this route. |
Set route data.
| route | Route to modify. |
| key | Unique string to identify the data. |
| data | Data object. This must be allocated via mprAlloc. |
Set the default language for the route.
| route | Route to modify. |
| language | Language symbolic name. For example: "en" for english. |
Set the route directory.
| route | Route to modify. |
| dir | Directory path name for the route content. |
Update the route flags.
| route | Route to modify. |
| flags | Flags mask. |
Set the handler to use for a route.
| route | Route to modify. |
| name | Handler name to define. |
Configure the route access log.
| route | Route to modify. |
| path | Path for route access log file. |
| size | Maximum size of the log file before archiving. |
| backup | Set to true to create a backup of the log file if archiving. |
| format | Log file format. |
| flags | Set to MPR_LOG_ANEW to archive the log when the application reboots. |
Define the methods for the route.
| route | Route to modify. |
| methods | Set to a comma or space separated list of methods. Can also set to "All" or "*" for all possible methods. Standard methods include: "DELETE, GET, OPTIONS, POST, PUT, TRACE". |
Set the route name.
| route | Route to modify. |
| name | Unique symbolic name for the route. If a name is not defined, the route pattern will be used as the name. |
Define a path token variable.
| route | Route to modify. |
| token | Name of the token to define. |
| value | Value of the token. |
Set the route pattern.
| route | Route to modify. |
| pattern | Route regular expression pattern. |
| flags | Set to HTTP_ROUTE_NOT to negate the pattern match result. |
Set the route prefix.
| route | Route to modify. |
| prefix | URI prefix to define for the route. |
Set the script to service the route.
| route | Route to modify. |
| script | Literal script to execute. |
| scriptPath | Pathname to the script file to execute. |
Set the source code module for the route.
| route | Route to modify. |
| source | Source path or description. |
Set a route target.
| route | Route to modify. |
| name | Target rule to add. Supported update rules include: "close", "redirect", "run" and "write". The "close" rule is used to do abortive closes for the request. This is useful for ward off known security attackers. For example: "close immediate". The "close" rule takes no addition parameters. The "redirect" rule is used to redirect the request to a new resource. For example: "redirect 302 /tryAgain.html". The "redirect" takes the form: "redirect status URI". The status code is used as the HTTP response code. The URI can be a fully qualified URI beginning with "http" or it can be a relative URI. The "run" target is used to run the configured handler to respond to the request. For example: "file ${DOCUMENT_ROOT}/${request.uri}.gz". The "write" rule is used to write literal data back to the client. For example: "write 200 Hello World\r\n". The "write" rule takes the form: "write [-r] status message". Write data is by default HTML encoded to help eliminate XSS security exposures. The "-r" option selects "raw" output and bypasses the HTML encoding of the write data string. WARNING: Take great care when using raw writes with tokens. Write data is not HTML encoded and echoing back to raw data to the client can cause XSS and other security issues. The status field defines the HTTP status code to use in the response. |
| details | Update rule parameters. |
Set the route template.
| route | Route to modify. |
| tplate | URI template to use. Templates may contain embedded tokens "{token}" where the token names correspond to the token names in the route pattern. |
Set the route trace filter.
| route | HttpRoute object. |
| dir | Trace direction. Set to HTTP_TRACE_TX or HTTP_TRACE_RX. |
| levels | Trace class levels. Indicies are: HTTP_TRACE_CONN, HTTP_TRACE_FIRST, HTTP_TRACE_HEADER, HTTP_TRACE_BODY, HTTP_TRACE_LIMITS, HTTP_TRACE_TIME. |
| len | Maximum content length eligible for tracing. |
| include | Comma or space separated list of extensions to include in tracing. |
| exclude | Comma or space separated list of extensions to exclude from tracing. |
Define the maximum number of workers for a route.
| route | Route to modify. |
| workers | Maximum number of workers for this route. |
Set stage data.
| conn | HttpConn connection object. |
| key | Key index into the stage data. |
| data | Reference to custom data allocated via mprAlloc. |
Expand a template string using given options.
| conn | HttpConn connection object created via $httpCreateConn. |
| tplate | Template string to process. |
| options | Hash of option values for embedded tokens. |
Tokenize a string based on route data.
| route | Route to modify. |
| str | String to expand. |
| fmt | Format string specifier. |
Tokenize a string based on route data.
| route | Route to modify. |
| str | String to expand. |
| fmt | Format string specifier. |
| args | Varargs argument list. |
Write data to the route access log.
| route | Route to modify. |
| buf | Data buffer to write. |
| len | Size of the data buffer. |
Http Rx.
| char * | accept | Accept header. | |
| char * | acceptCharset | Accept-Charset header. | |
| char * | acceptEncoding | Accept-Encoding header. | |
| char * | acceptLanguage | Accept-Language header. | |
| int | authenticated | Request has been authenticated. | |
| char * | authType | Authorization type (basic|digest) (ENV: AUTH_TYPE). | |
| int | autoDelete | Automatically delete uploaded files. | |
| MprOff | bytesRead | Length of content read by user. | |
| int | chunkState | Chunk encoding state. | |
| HttpConn * | conn | Connection object. | |
| char * | connection | Connection header. | |
| char * | contentLength | Content length string value. | |
| char * | cookie | Cookie header. | |
| int | eof | All read data has been received (eof). | |
| MprList * | etags | Document etag to uniquely identify the document version. | |
| char * | extraPath | Extra path information (CGI|PHP). | |
| MprHash * | files | Uploaded files. Managed by the upload filter. | |
| int | flags | Rx modifiers. | |
| int | form | Using mime-type application/x-www-form-urlencoded. | |
| HttpPacket * | headerPacket | HTTP headers. | |
| MprHash * | headers | Header variables. | |
| char * | hostHeader | Client supplied host name header. | |
| bool | ifMatch | If-Match processing requested. | |
| bool | ifModified | If-Modified processing requested. | |
| MprList * | inputPipeline | Input processing. | |
| HttpRange * | inputRange | Specified range for rx (post) data. | |
| HttpLang * | lang | Selected language. | |
| MprOff | length | Content length header value (ENV: CONTENT_LENGTH). | |
| char * | method | Request method. | |
| char * | mimeType | Mime type of the request payload (ENV: CONTENT_TYPE). | |
| int | needInputPipeline | Input pipeline required to process received data. | |
| char * | originalMethod | Original method from the client. | |
| char * | originalUri | Original URI passed by the client. | |
| MprHash * | params | Request params (Query and post data variables). | |
| char * | paramString | Cached param data as a string. | |
| HttpUri * | parsedUri | Parsed request uri. | |
| char * | pathInfo | Path information after the scriptName (Decoded and normalized). | |
| char * | pragma | Pragma header. | |
| char * | redirect | Redirect route header. | |
| char * | referrer | Refering URL. | |
| MprOff | remainingContent | Remaining content data to read (in next chunk if chunked). | |
| MprHash * | requestData | General request data storage. Users must create hash table if required. | |
| HttpRoute * | route | Route for request. | |
| char * | scriptName | ScriptName portion of the uri (Decoded). May be empty or start with "/". | |
| char * | securityToken | Security form token. | |
| MprTime | since | If-Modified date. | |
| int | status | HTTP response status. | |
| char * | statusMessage | HTTP Response status message. | |
| int | streamInput | Streaming read data. Means !form. | |
| MprHash * | svars | Server variables. | |
| char * | target | Route target. | |
| int | traceLevel | General trace level for header level info. | |
| int | upload | Request is using file upload. | |
| char * | uploadDir | Upload directory. | |
| char * | uri | Current URI (not decoded, may be rewritten). | |
| char * | userAgent | User-Agent header. |
Add query and form body data to params.
| conn | HttpConn connection object. |
Test if the content has not been modified.
| conn | HttpConn connection object. |
Create CGI parameters.
| conn | HttpConn connection object. |
Get the receive body content length.
| conn | HttpConn connection object created via $httpCreateConn. |
Get the request cookies.
| conn | HttpConn connection object created via $httpCreateConn. |
Get an rx http header.
| conn | HttpConn connection object created via $httpCreateConn. |
| key | Name of the header to retrieve. This should be a lower case header name. For example: "Connection". |
Get the hash table of rx Http headers.
| conn | HttpConn connection object created via $httpCreateConn. |
Get all the request http headers.
| conn | HttpConn connection object created via $httpCreateConn. |
Get a header string from the given hash.
| hash | Hash table to examine. |
Get a form variable as an integer.
| conn | HttpConn connection object. |
| var | Name of the form variable to retrieve. |
| defaultValue | Default value to return if the variable is not defined. Can be null. |
Get the language to use for the request.
| conn | HttpConn connection object. |
| spoken | Hash table of HttpLang records. This is typically route->languages. |
| defaultLang | Default language to use if none specified in the request Accept-Language header. |
Get a request param.
| conn | HttpConn connection object. |
| var | Name of the request param to retrieve. |
| defaultValue | Default value to return if the variable is not defined. Can be null. |
Get the request params table.
| conn | HttpConn connection object. |
Get the request params table as a string.
| conn | HttpConn connection object. |
Get the request query string.
| conn | HttpConn connection object. |
Get stage data.
| conn | HttpConn connection object. |
| key | Key index into the stage data. |
Get the response status.
| conn | HttpConn connection object created via $httpCreateConn. |
Get the Http response status message.
The Http status message is supplied on the first line of the Http response| conn | HttpConn connection object created via $httpCreateConn. |
Match a form variable with an expected value.
| conn | HttpConn connection object. |
| var | Name of the form variable. |
| expected | Expected value to match with. |
Read rx body data.
This will read available body data. If in sync mode, this call may block. If in async mode, the call will not block and will return with whatever data is available| conn | HttpConn connection object created via $httpCreateConn. |
| buffer | Buffer to receive read data. |
| size | Size of buffer. |
Read response data as a string.
This will read all rx body and return a string that the caller should free. This will block and should not be used in async mode| conn | HttpConn connection object created via $httpCreateConn. |
Set the endpoint IP address.
| endpoint | HttpEndpoint object created via httpCreateEndpoint |
| ip | IP address to use for the endpoint. Set to null to listen on all interfaces. |
| port | Listening port number to use for the endpoint. |
Set an integer request param value.
| conn | HttpConn connection object. |
| var | Name of the request param to retrieve. |
| value | Default value to return if the variable is not defined. Can be null. |
Set a new HTTP method for processing.
| conn | HttpConn connection object. |
| method | New method to use. |
Set a request param value.
| conn | HttpConn connection object. |
| var | Name of the request param to retrieve. |
| value | Default value to return if the variable is not defined. Can be null. |
Set a new URI for processing.
| conn | HttpConn connection object. |
| uri | New URI to use. The URI can be fully qualified starting with a scheme ("http") or it can be a partial/relative URI. Missing portions of the URI will be completed with equivalent portions from the current URI. For example: if the current request URI was |
| query | Optional query string to define with the new URI. If query is null, any query string defined with the previous URI will be used. If query is set to the empty string, a previous query will be discarded. |
Test if a request param is defined.
| conn | HttpConn connection object. |
| var | Name of the request param to retrieve. |
Trim extra path from the URI.
| conn | HttpConn connection object. |
Validate the request against defined resource limits.
| endpoint | The endpoint on which the server was listening. |
| event | Processing event. The supported events are: HTTP_VALIDATE_OPEN_CONN, HTTP_VALIDATE_CLOSE_CONN, HTTP_VALIDATE_OPEN_REQUEST and HTTP_VALIDATE_CLOSE_REQUEST. |
| conn | HttpConn connection object. |
Pipeline Stages.
| int(* | check)(struct HttpConn *conn, struct HttpRoute *route) |
Check a request.
|
|
| void(* | close)(HttpQueue *q) |
Close the queue.
|
|
| MprHash * | extensions | Matching extensions for this filter. | |
| int | flags | Stage flags. | |
| void(* | incomingData)(HttpQueue *q, HttpPacket *packet) |
Process incoming data.
|
|
| void(* | incomingService)(HttpQueue *q) |
Service the incoming data queue.
|
|
| int(* | match)(struct HttpConn *conn, struct HttpRoute *route, int dir) |
Match a request.
|
|
| MprModule * | module | Backing module. | |
| char * | name | Stage name. | |
| void(* | open)(HttpQueue *q) |
Open the queue.
|
|
| void(* | outgoingData)(HttpQueue *q, HttpPacket *packet) |
Process outgoing data.
|
|
| void(* | outgoingService)(HttpQueue *q) |
Service the outgoing data queue.
|
|
| char * | path | Backing module path (from LoadModule). | |
| void(* | process)(HttpQueue *q) |
Process the data.
|
|
| void * | stageData | Private stage data. | |
| void(* | start)(HttpQueue *q) |
Start the handler.
|
Create a clone of an existing state.
This is used when creating filters configured to match certain extensions| http | Http object returned from httpCreate |
| stage | Stage object to clone. |
Create a connector stage.
| http | Http object returned from httpCreate |
| name | Name of connector stage. |
| flags | Stage flags mask. These specify what Http request methods will be supported by this stage. Or together any of the following flags:
|
| module | Optional module object for loadable stages. |
Create a filter stage.
| http | Http object. |
| name | Name of connector stage. |
| flags | Stage flags mask. These specify what Http request methods will be supported by this stage. Or together any of the following flags:
|
| module | Optional module object for loadable stages. |
Create a request handler stage.
| http | Http object. |
| name | Name of connector stage. |
| flags | Stage flags mask. These specify what Http request methods will be supported by this stage. Or together any of the following flags:
|
| module | Optional module object for loadable stages. |
Create a connector stage.
| http | Http object returned from httpCreate |
| name | Name of connector stage. |
| flags | Stage flags mask. These specify what Http request methods will be supported by this stage. Or together any of the following flags:
|
| module | Optional module object for loadable stages. |
Default outgoing data handling.
| q | Queue object. |
Handle a Http Trace or Options method request.
| conn | HttpConn object created via $httpCreateConn. |
Lookup a stage by name.
| http | Http object. |
| name | Name of stage to locate. |
Lookup stage data.
| http | Http object. |
| name | Name of the stage concerned. |
Http Tx.
| char * | altBody | Alternate transmission for errors. | |
| MprOff | bytesWritten | Bytes written including headers. | |
| HttpCache * | cache | Cache control entry (only set if this request is being cached). | |
| MprBuf * | cacheBuffer | Response caching buffer. | |
| ssize | cacheBufferLength | Current size of the cache buffer data. | |
| cchar * | cachedContent | Retrieved cached response to send. | |
| ssize | chunkSize | Chunk size to use when using transfer encoding. Zero for unchunked. | |
| struct HttpConn * | conn | Current connection object. | |
| HttpStage * | connector | Network connector to send / receive socket data. | |
| HttpRange * | currentRange | Current range being fullfilled. | |
| MprOff | entityLength | Original content length before range subsetting. | |
| char * | etag | Unique identifier tag. | |
| cchar * | ext | Filename extension. | |
| MprFile * | file | File to be served. | |
| MprPath | fileInfo | File information if there is a real file to serve. | |
| char * | filename | Name of a real file being served (typically pathInfo mapped). | |
| int | flags | Response flags. | |
| HttpStage * | handler | Server-side request handler stage. | |
| MprHash * | headers | Transmission headers. | |
| ssize | headerSize | Size of the header written. | |
| MprOff | length | Transmission content length. | |
| char * | method | Client request method GET, HEAD, POST, DELETE, OPTIONS, PUT, TRACE. | |
| MprList * | outputPipeline | Output processing. | |
| HttpRange * | outputRanges | Data ranges for tx data. | |
| HttpUri * | parsedUri | Client request uri. | |
| HttpQueue * | queue[2] | Dummy head for the queues. | |
| char * | rangeBoundary | Inter-range boundary. | |
| MprOff | rangePos | Current range I/O position in response data. | |
| int | started | Handler has started. | |
| int | status | HTTP request status. | |
| int | traceMethods | Handler methods supported. |
Add a header to the transmission using a format string.
| conn | HttpConn connection object created via $httpCreateConn. |
| key | Http response header key. |
| fmt | Printf style formatted string to use as the header key value. |
| ... | Arguments for fmt. |
Add a header to the transmission.
| conn | HttpConn connection object created via $httpCreateConn. |
| key | Http response header key. |
| value | Value to set for the header. |
Append a transmission header.
| conn | HttpConn connection object created via $httpCreateConn. |
| key | Http response header key. |
| fmt | Printf style formatted string to use as the header key value. |
| ... | Arguments for fmt. |
Append a transmission header string.
| conn | HttpConn connection object created via $httpCreateConn. |
| key | Http response header key. |
| value | Value to set for the header. |
Connect to a server and issue Http client request.
| conn | HttpConn connection object created via $httpCreateConn. |
| method | Http method to use. Valid methods include: "GET", "POST", "PUT", "DELETE", "OPTIONS" and "TRACE". |
| uri | URI to fetch. |
Create the tx object.
This is used internally by the http library| conn | HttpConn connection object created via $httpCreateConn. |
| headers | Optional headers to use for the transmission. |
Destroy the tx object.
| tx | Tx object. |
Finalize transmission of the http request.
| conn | HttpConn connection object. |
Flush tx data.
This writes any buffered data| conn | HttpConn connection object created via $httpCreateConn. |
Follow redirctions.
| conn | HttpConn connection object created via $httpCreateConn. |
| follow | Set to true to enable transparent redirections. |
Format an error transmission.
| conn | HttpConn connection object created via $httpCreateConn. |
| status | Http response status code. |
| fmt | Printf style formatted string. This string may contain HTML tags and is not HTML encoded before sending to the user. NOTE: Do not send user input back to the client using this method. Otherwise you open large security holes. |
| ... | Arguments for fmt. |
Format an alternate response.
| conn | HttpConn connection object created via $httpCreateConn. |
| fmt | Printf style formatted string. This string may contain HTML tags and is not HTML encoded before sending to the user. NOTE: Do not send user input back to the client using this method. Otherwise you open large security holes. |
| ... | Arguments for fmt. |
Format a response body.
| conn | HttpConn connection object created via $httpCreateConn. |
| title | Title string to format into the HTML transmission body. |
| fmt | Printf style formatted string. This string may contain HTML tags and is not HTML encoded before sending to the user. NOTE: Do not send user input back to the client using this method. Otherwise you open large security holes. |
| ... | Arguments for fmt. |
Format an error response body.
| conn | HttpConn connection object created via $httpCreateConn. |
| status | HTTP response status code. |
| fmt | Printf style formatted string. This string may contain HTML tags and is not HTML encoded before sending to the user. NOTE: Do not send user input back to the client using this method. Otherwise you open large security holes. |
| ... | Arguments for fmt. |
Format an alternate response.
| conn | HttpConn connection object created via $httpCreateConn. |
| fmt | Printf style formatted string. This string may contain HTML tags and is not HTML encoded before sending to the user. NOTE: Do not send user input back to the client using this method. Otherwise you open large security holes. |
| args | Varargs style list of arguments. |
Return whether transfer chunked encoding will be used on this request.
| conn | HttpConn connection object created via $httpCreateConn. |
Test if request has been finalized.
| conn | HttpConn connection object. |
Determine if the transmission needs a transparent retry to implement authentication or redirection.
This is used by client requests. If authentication is required, a request must first be tried once to receive some authentication key information that must be resubmitted to gain access| conn | HttpConn connection object created via $httpCreateConn. |
| url | Reference to a string to receive a redirection URL. Set to NULL if not redirection is required. |
Redirect the client.
| conn | HttpConn connection object created via $httpCreateConn. |
| status | Http status code to send with the response. |
| uri | New uri for the client. |
Remove a header from the transmission.
| conn | HttpConn connection object created via $httpCreateConn. |
| key | Http response header key. |
Define a content length header in the transmission.
This will define a "Content-Length: NNN" request header and set Tx.length| conn | HttpConn connection object created via $httpCreateConn. |
| length | Numeric value for the content length header. |
Set the transmission (response) content mime type.
| conn | HttpConn connection object created via $httpCreateConn. |
| mimeType | Mime type string. |
Set a transmission cookie.
| conn | HttpConn connection object created via $httpCreateConn. |
| name | Cookie name. |
| value | Cookie value. |
| path | URI path to which the cookie applies. |
| domain | Domain in which the cookie applies. Must have 2-3 dots. |
| lifespan | Duration for the cookie to persist in msec. |
| flags | Select from HTTP_COOKIE_SECURE for a "secure" cookie, or HTTP_COOKIE_HTTP for a "httponly" cookie. See RFC 2109 for details about secure and httponly cookies. |
Set a transmission header.
| conn | HttpConn connection object created via $httpCreateConn. |
| key | Http response header key. |
| fmt | Printf style formatted string to use as the header key value. |
| ... | Arguments for fmt. |
Set a simple key/value transmission header.
| conn | HttpConn connection object created via $httpCreateConn. |
| key | Http response header key. |
| value | String value for the key. |
Set the responded flag for the request.
| conn | HttpConn connection object. |
Set a Http response status.
| conn | HttpConn connection object created via $httpCreateConn. |
| status | Http status code. |
Indicate that the transmission socket is blocked.
| conn | Http connection object created via $httpCreateConn. |
Wait for the connection to achieve the requested state Used for blocking client requests.
| conn | HttpConn connection object created via $httpCreateConn. |
| state | HTTP_STATE_XXX to wait for. |
| timeout | Timeout in milliseconds to wait. |
Write the transmission headers.
| conn | HttpConn connection object created via $httpCreateConn. |
| packet | Packet into which to place the headers. |
Upload File.
Add an Uploaded file.
| conn | HttpConn connection object created via $httpCreateConn. |
| id | Unique identifier for the file. |
| file | Instance of HttpUploadFile. |
Remove all uploaded files.
| conn | HttpConn connection object created via $httpCreateConn. |
Remove an uploaded file.
| conn | HttpConn connection object created via $httpCreateConn. |
| id | Identifier used with httpAddUploadFile for the file. |
URI management.
| char * | ext | Document extension. | |
| int | flags | Flags. | |
| char * | host | Host name. | |
| char * | path | Uri path (without scheme, host, query or fragements). | |
| int | port | Port number. | |
| char * | query | Query string. | |
| char * | reference | Reference fragment within the specified resource. | |
| char * | scheme | URI scheme (http|https|...). | |
| int | secure | Using https. | |
| char * | uri | Original URI (not decoded). |
Clone a URI.
| base | Base URI to copy. |
| complete | If set to true, missing fields in the URI will be completed with default values. |
Complete the given URI.
| uri | URI to complete. |
| other | Other URI to supply the missing components. |
Create and initialize a URI.
| uri | Uri string to parse. |
| complete | Add missing components. ie. Add scheme, host and port if not supplied. |
Create a URI from parts.
| scheme | The URI scheme. This is typically "http" or "https". |
| host | The URI host name portion. This can be a textual host and domain name or it can be an IP address. |
| port | The URI port number. Set to zero to accept the default value for the selected scheme. |
| path | The URI path to the requested document. |
| reference | URI reference with an HTML document. This is the URI component after the "#" in the URI path. |
| query | URI query component. This is the URI component after the "?" in the URI. |
| complete | Set to true to complete the URI by supplying missing URI parts with default values. |
Format a URI.
| scheme | Protocol string for the uri. Example: "http". |
| host | Host or IP address. |
| port | TCP/IP port number. |
| path | URL path. |
| ref | URL reference fragment. |
| query | Additiona query parameters. |
| complete | Add missing elements. For example, if scheme is null, then add "http". |
Get a relative URI from the base to the target.
| base | The base URI considered to be the current URI. Think of this as the current directory. |
| target | The destination URI for which a relative URI will be crafted to reach. |
| clone | If true, the target URI will be cloned if the target is an absolute URI or if a relative URI cannot be constructed. |
Join URIs.
| base | Base URI to being with. |
| argc | Count of URIs in others. |
| others | Array of URIs to join to the base. |
Join a URI path.
| result | URI that will be modified with a joined path. |
| base | URI supplying the base path. |
| other | Other URI whose path is joined to the base. |
Get the mime type for an extension.
This call will return the mime type from a limited internal set of mime types for the given path or extension| ext | Path or extension to examine. |
Make a URI local.
| uri | URI to modify. |
Normalize a URI.
| uri | URI object to normalize. |
Normalize a URI.
| uri | Uri path string to normalize. This is the URI path portion without scheme, host and port components. |
Resolve URIs relative to a base.
| base | Base URI to begin with. |
| argc | Count of URIs in the others array. |
| others | Array of URIs that are sucessively resolved relative to the base. |
| local | If true, the base scheme, host and port are ignored. |
Convert a Uri to a string.
| uri | A Uri object created via httpCreateUri. |
| complete | Fill in missing parts of the uri. |
Internal APIs.
Accept a new connection.
Accept a new client connection on a new socket. If multithreaded, this will come in on a worker thread dedicated to this connection. This is called from the listen wait handler| endpoint | The endpoint on which the server was listening. |
| event | Mpr event object. |
Add an option to the options table.
| options | Option table returned from httpGetOptions. |
| field | Field key name. |
| value | Value to use for the field. |
Adjust the packet end position.
This adjusts the packet content by the given size. The packet length (size) is decremented by the requested amount. If the packet describes entity data, the Packet.esize field is reduced by the requested size amount. If the packet has actual data buffered in Packet.content, the content buffer end position is reduced by by the size amount| packet | Packet to modify. |
| size | Size to adjust packet end position. |
Adjust the packet starting position.
This adjusts the packet content by the given size. The packet position is incremented by start and the packet length (size) is decremented. If the packet describes entity data, the given size amount to the Packet.epos and decrements the Packet.esize fields. If the packet has actual data buffered in Packet.content, the content buffer start is incremeneted by the size amount| packet | Packet to modify. |
| size | Size to add to the packet current position. |
Create and configure a new endpoint.
| home | Home directory for configuration files for the endpoint. |
| documents | Directory containing the. |
| ip | IP address to use for the endpoint. Set to null to listen on all interfaces. |
| port | Listening port number to use for the endpoint. |
Flush queue data.
| q | Queue to flush. |
| block | If set to "true", this call will block until the data has drained below the queue maximum. |
Get the endpoint context object.
| endpoint | HttpEndpoint object created via httpCreateEndpoint |
Extract a field value from an option string.
| options | Option string of the form: "field='value' field='value'...". |
| field | Field key name. |
| defaultValue | Value to use if "field" is not found in options. |
Convert an options string into an options table.
| options | Option string of the form: "{field:'value', field:'value'}" This is a sub-set of the JSON syntax. Arrays are not supported. |
Get a path extension.
| path | File pathname to examine. |
Get the queue data for the connection.
| conn | HttpConn connection object created via $httpCreateConn. |
Get if the endpoint is running in asynchronous mode.
| endpoint | HttpEndpoint object created via httpCreateEndpoint |
Create a URI link.
| conn | HttpConn connection object. |
| target | The URI target. The target parameter can be a URI string or JSON style set of options. The target will have any embedded "{tokens}" expanded by using token values from the request parameters. If the target has an absolute URI path, that path is used directly after tokenization. If the target begins with "~", that character will be replaced with the route prefix. This is a very convenient way to create application top-level relative links. If the target is a string that begins with "{AT}" it will be interpreted as a controller/action pair of the form "{AT}Controller/action". If the "controller/" portion is absent, the current controller is used. If the action component is missing, the "list" action is used. A bare "{AT}" refers to the "list" action of the current controller. If the target starts with "{" it is interpreted as being a JSON style set of options that describe the link. If the target is a relative URI path, it is appended to the current request URI path. If the is a JSON style of options, it can specify the URI components: scheme, host, port, path, reference and query. If these component properties are supplied, these will be combined to create a URI. If the target specifies either a controller/action or a JSON set of options, The URI will be created according to the route URI template. The template may be explicitly specified via a "route" target property. Otherwise, if an "action" property is specified, the route of the same name will be used. If these don't result in a usable route, the "default" route will be used. These are the properties supported in a JSON style "{ ... }" target:
|
| options | Hash of option values for embedded tokens. |
Lookup a listening endpoint.
| http | Http object created via httpCreate |
| ip | Listening IP address to look for. |
| port | Listening port number. |
Lookup a host name.
| endpoint | HttpEndpoint object created via httpCreateEndpoint |
| name | Host name to search for. |
Lookup a route by name.
| host | HttpHost object owning the route table. |
| name | Route name to find. If null or empty, look for "default". |
Map the request URI and route target to a filename.
| conn | HttpConn connection object. |
| route | Route to modify. |
Tell the tx to omit sending any body.
| conn | HttpConn connection object created via $httpCreateConn. |
Open the queue.
Call the queue open entry point| q | Queue reference. |
| chunkSize | Preferred chunk size. |
Secure an endpoint.
| endpoint | HttpEndpoint object created via httpCreateEndpoint |
| ssl | MprSsl object. |
Secure an endpoint by name.
| name | Endpoint name. The endpoint name is comprised of the IP and port. For example: "127.0.0.1:7777". |
| ssl | MprSsl object. |
Service pipeline queues to flow data.
| conn | HttpConn object created via $httpCreateConn. |
Set the http context object.
| http | Http object created via httpCreate |
| context | New context object. |
Control if the endpoint is running in asynchronous mode.
| endpoint | HttpEndpoint object created via httpCreateEndpoint |
| enable | Set to 1 to enable async mode. |
Set the endpoint context object.
| endpoint | HttpEndpoint object created via httpCreateEndpoint |
| context | New context object. |
Define the length of the transmission content.
When static content is used for the transmission body, defining the entity length permits the request pipeline to know when all the data has been sent| conn | HttpConn connection object created via $httpCreateConn. |
| len | Transmission body length in bytes. |
Set the software description.
| http | Http object created via httpCreate |
| description | String describing the Http software. By default, this is set to HTTP_NAME. |
Verify a queue.
| q | Queue reference. |
Authentication Access control mask.
Callback to fill headers.
| arg | Argument provided to httpSetHeadersCallback when the callback was established. |
General route procedure.
Used by targets, conditions and updatesLookup password callback.
| auth | HttpAuth object. |
| realm | Http authentication realm. |
| user | User name for whom to retrieve the password. |
Validate user credentials callback.
| auth | HttpAuth object. |
| realm | Http authentication realm. |
| user | User name for whom to retrieve the password. |
| pass | User password. |
| required | Authentication "required" field. Set to "user", "group" or "valid". |
| msg | Output parameter to contain any appropriate error message. |
Set environment vars callback.
Invoked per request to permit custom form var definitionI/O callback for connections.
| conn | HttpConn object created via $httpCreateConn. |
| event | Event object describing the I/O event. |
Listen callback.
Invoked after listening on a socket endpointConnection Http state change notification callback.
| conn | HttpConn connection object created via $httpCreateConn. |
| state | Http state. |
| flags | Additional http state information. |
Define an callback for IO events on this connection.
| conn | HttpConn connection object created via $httpCreateConn. |
| fn | Callback function. |
| arg | Data argument to provide to the callback function. |
Callback procedure to fill a packet with data.
| q | Queue owning the packet. |
| packet | The packet to fill. |
| off | Offset in the packet to fill with data. |
| size | Size of packet from the offset to fill. |
Language definition record for routes.
| int | flags | Control suffix position. | |
| char * | path | Document directory for the language. | |
| char * | suffix | Suffix to add to filenames. |
Route operation record.
| char * | details | General route operation details. | |
| void * | mdata | pcre_ data managed by malloc(). | |
| char * | name | Name of route operation. | |
| char * | value | Value to assign to var. | |
| char * | var | Var to set. |