Module openflax.handler.txt

View-as-text handler for OpenFlax.

Behaviour: openflax.handler.

Description

View-as-text handler for OpenFlax.

Some browsers (notably Internet Explorer) prefer to download files if there is a file assocation for the files' extension configured. This handler gets around that by displaying the file as plaintext, generally with an extension of .txt to convince the browser likewise.

This handler's security/featurefulness tradeoff level is 5 (Moderate.) It requires openflax.handler.file.

Function Index

serve/1Serves a text file generated from another file.
start/1Initializes the view-as-text subsystem.
stop/1Shuts down the view-as-text subsystem.

Function Details

serve/1

serve(Conf::conf()) -> {response(), conf()}

Serves a text file generated from another file.

start/1

start(Conf::conf()) -> conf()

Initializes the view-as-text subsystem.

stop/1

stop(Conf::conf()) -> conf()

Shuts down the view-as-text subsystem.