283 DoubleList filterList;
288 HttpResRdrHeader* headers;
328#define HttpResRdr_setMaxAge(o, maxAgeMA) (o)->maxAge=maxAgeMA
335#define HttpResRdr_setAuthenticator(o, authenticator, realm) \
336 HttpDir_setAuthenticator((HttpDir*)o, authenticator, realm)
343#define HttpResRdr_ETagSize 38
344BA_API
void HttpResRdr_fmtETag(
char* buf,
const IoStat* st);
350BA_API
void HttpResRdr_setHeader(
HttpResRdr* o, HttpResRdrHeader* headers);
356#define HttpResRdr_getIo(o) (o)->io
BA_API void HttpResRdr_constructor2(HttpResRdr *o, IoIntf *io, const char *domain, const char *p404, AllocatorIntf *alloc, S8 priority)
Initialize a HttpResRdr for name based virtual hosting.
BA_API void HttpRdFilter_destructor(HttpRdFilter *o)
Unlink a filter from its reader if installed.
BA_API int HttpResRdr_installFilter(HttpResRdr *o, HttpRdFilter *filter)
Install a file-extension filter.
BA_API void HttpResRdr_sendFile(IoIntf *io, const char *name, IoStat *st, HttpCommand *cmd)
Send an IoIntf resource through the current response.
#define HttpResRdr_setMaxAge(o, maxAgeMA)
C form of HttpResRdr::setMaxAge.
Definition: HttpResRdr.h:328
void(* HttpRdFilter_Service)(struct HttpRdFilter *o, const char *name, IoStat *st, HttpCommand *cmd)
Process a resource selected by a reader's file-extension filter.
Definition: HttpResRdr.h:59
HttpResRdr HttpResRdr
The HTTP resource reader searches and presents IoIntf resources to HTTP clients requesting such infor...
#define HttpResRdr_getIo(o)
Access the filesystem supplied at construction.
Definition: HttpResRdr.h:356
BA_API void HttpResRdr_destructor(HttpResRdr *o)
Detach and destroy directory state, including the prologue root and owned custom-header storage.
BA_API void HttpRdFilter_constructor(HttpRdFilter *o, const char *ext, HttpRdFilter_Service serviceFp)
Initialize a filter without installing it.
BA_API int HttpResRdr_insertPrologDir(HttpResRdr *o, HttpDir *dir)
Insert a prologue HttpDir.
BA_API void HttpResRdr_constructor(HttpResRdr *o, IoIntf *io, const char *dirName, AllocatorIntf *alloc, S8 priority)
Initializes a HttpResRdr.
struct HttpRdFilter HttpRdFilter
Superclass for HttpResRdr filters.
ResIntfPtr(* IoIntf_DeflateGzip)(ResIntfPtr resPtr, const char *name, ThreadMutex *m, BaFileSize *size, BaBool *isCompressed)
Optionally compress an open resource or range into temporary gzip storage.
Definition: IoIntf.h:291
int(* HttpDir_Service)(struct HttpDir *o, const char *relPath, HttpCommand *cmd)
The HttpDir service callback function.
Definition: HttpServer.h:2747
uint16_t U16
Unsigned 16-bit integer.
Definition: GenPrimT.h:91
S64 BaTime
An arithmetic type representing calendar time with epoch of 1970-01-01 00:00:00 UTC,...
Definition: GenPrimT.h:103
int8_t S8
Signed 8-bit integer.
Definition: GenPrimT.h:81
Memory allocation and deallocation Interface class.
Definition: AllocatorIntf.h:98
The HttpCommand class is a container class for the HttpRequest and HttpResponse command pair.
Definition: HttpServer.h:2151
An instance of the HttpDir class, which is a collection of zero or more resources,...
Definition: HttpServer.h:2777
Superclass for HttpResRdr filters.
Definition: HttpResRdr.h:68
The HttpServer creates an HttpRequest object when the HttpServer parses a client request.
Definition: HttpServer.h:950
The HTTP resource reader searches and presents IoIntf resources to HTTP clients requesting such infor...
Definition: HttpResRdr.h:170
IoIntf * getIo()
Access the filesystem supplied at construction.
Definition: HttpResRdr.h:385
HttpResRdr()
Uninitialized storage; call a C constructor before use.
Definition: HttpResRdr.h:172
int insertPrologDir(HttpDir *dir)
Insert a prologue HttpDir.
Definition: HttpResRdr.h:368
int installFilter(HttpRdFilter *filter)
Install a file-extension filter.
Definition: HttpResRdr.h:375
~HttpResRdr()
Detach and destroy directory state, including the prologue root and owned custom-header storage.
Definition: HttpResRdr.h:372
static void sendFile(IoIntf *io, const char *name, IoStat *st, HttpCommand *cmd)
Send an IoIntf resource through the current response.
Definition: HttpResRdr.h:381
void setMaxAge(BaTime maxAge)
Configure Cache-Control max-age for ordinary static resources.
Definition: HttpResRdr.h:378
The IoIntf class specifies an abstract file API, implementations include ZipIo, DiskIo,...
Definition: IoIntf.h:482
Resource information.
Definition: IoIntf.h:170