Barracuda Application Server C/C++ Reference
Native APIs, integration guides, and platform interfaces
HttpMuxDir.h File Reference
#include <HttpServer.h>
Include dependency graph for HttpMuxDir.h:

Go to the source code of this file.

Classes

struct  HttpMuxDir
 HttpMuxDir HttpDir Multiplexer captures many resource requests and feeds all resource requests to one page. More...
 

Typedefs

typedef HttpMuxDir HttpMuxDir
 HttpMuxDir HttpDir Multiplexer captures many resource requests and feeds all resource requests to one page. More...
 

Functions

void HttpMuxDir_constructor (HttpMuxDir *o, const char *name, HttpDir *startDir, const char *muxResource, S8 priority)
 Initialize a multiplexer; see HttpMuxDir::HttpMuxDir. More...
 

Typedef Documentation

◆ HttpMuxDir

HttpMuxDir HttpDir Multiplexer captures many resource requests and feeds all resource requests to one page.

The HttpMuxDir class makes it possible to have an LSP or CSP page handle multiple URL's. The HttpMuxDir class is typically used in Representational State Transfer (REST) design. Another use for this class is to design a template based page design, where all pages use a common header and footer.

The page can get the full URI by calling:

C/C++ code HttpResponse::getRequestURI.

LSP: request:uri()

The URI is typically used as a path for opening HTML page fragments or for searching in a database.

The page can signal that it did not handle the request by leaving the response untouched: no output operation, no committed response, and status code still 200. The virtual file system will, in this case, continue searching for the requested resource.

Function Documentation

◆ HttpMuxDir_constructor()

void HttpMuxDir_constructor ( HttpMuxDir o,
const char *  name,
HttpDir startDir,
const char *  muxResource,
S8  priority 
)

Initialize a multiplexer; see HttpMuxDir::HttpMuxDir.

Parameters
[out]oCaller-owned object.
[in]nameBorrowed directory name, valid throughout use; NULL means empty.
[in]startDirBorrowed target directory, valid throughout use.
[in]muxResourceBorrowed NUL-terminated target path, valid throughout use.
[in]prioritySigned directory priority. No target lookup is performed until a request is served.