All Classes Namespaces Functions Variables Groups Pages
WebUtil Module

# Introduction to the WebUtil Module

The WebUtil module provides code that support higher-level web server operations.

To use this module, use `"%requires WebUtil"` in your code.

All the public symbols in the module are defined in the WebUtil namespace

Classes:

- TextTemplateBase: the base class for all Program containers for template programs where text is rendered from templates made up of mixed Qore and text
- FileTemplate: models a single template based on a real file on the filesystem and provides compilation and rendering support for the template; supports recompiling on the fly if the file's modification time changes
- TemplateFileManager: manages templates based on real files on the filesystem, uses FileTemplate to store the templates and render output; uses efficient locking to safely handle multiple concurrent requests
- StaticTemplateManager: manages mixed Qore and text templates that are rendered to generate a final file; useful for HTML rendering for example
- FileHandler: a class for serving files from the file system anchored at a particular URL; also uses TemplateFileManager to automatically manage any template files found; supports automatic compilation of and rendering from template files

# Release Notes

## WebUtil v1.3

- updated FileHandler::handleRequest() to allow for chunked sends
- fixed a bug where template programs with Qore::PO_ALLOW_BARE_REFS set did not work
- fixed a bug serviing index files in FileHandler::tryServeRequest() where index files could be incorrectly served with a `"204 No Content"` response (issue 616)

## WebUtil v1.2

- fixed a bug where template programs with parse option Qore::PO_ALLOW_BARE_REFS set did not work

## WebUtil v1.1

- added logic to the default file serving code to determine if the file is a binary or text file from the MIME type

## WebUtil v1.0

- the initial version of the WebUtil module