Seastar
High performance C++ framework for concurrent servers
|
This is a base class for file transformer.
File transformer adds the ability to modify a file content before returning the results, it acts as a factory class for output_stream.
The transformer decides according to the file extension if transforming is needed.
If a transformation is needed it would create a new output stream from the given stream.
#include <seastar/http/file_handler.hh>
Public Member Functions | |
virtual output_stream< char > | transform (std::unique_ptr< http::request > req, const sstring &extension, output_stream< char > &&s)=0 |
file_transformer (file_transformer &&)=default | |
|
pure virtual |
Any file transformer should implement this method.
req | the request |
extension | the file extension originating the content returns a new output stream to be used when writing the file to the reply |
Implemented in seastar::httpd::content_replace.