Seastar
High performance C++ framework for concurrent servers
Public Member Functions | List of all members
seastar::httpd::file_transformer Class Referenceabstract

Detailed Description

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>

Inheritance diagram for seastar::httpd::file_transformer:
seastar::httpd::content_replace

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
 

Member Function Documentation

◆ transform()

virtual output_stream<char> seastar::httpd::file_transformer::transform ( std::unique_ptr< http::request req,
const sstring &  extension,
output_stream< char > &&  s 
)
pure virtual

Any file transformer should implement this method.

Parameters
reqthe request
extensionthe 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.


The documentation for this class was generated from the following file: