NAME

DTA::CAB::Server::HTTP::Handler::File - CAB HTTP Server: request handler: static file

SYNOPSIS

 use DTA::CAB::Server::HTTP::Handler::File;
 
 $h = $class_or_obj->new(%options);
 $bool = $obj->prepare($srv);
 $rsp = $h->run($server, $localPath, $clientConn, $httpRequest);
 

DESCRIPTION

new
 $h = $class_or_obj->new(%options);

%$h, %options:

 contentType => $mimeType,    ##-- default: text/plain
 file => $filename,           ##-- filename to return
prepare
 $bool = $obj->prepare($srv);

Checks for target file readability.

run
 $rsp = $h->run($server, $localPath, $clientConn, $httpRequest);

Returns the the contents of $h->{file} to the client.

AUTHOR

Bryan Jurish <moocow@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2010-2019 by Bryan Jurish

This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.24.1 or, at your option, any later version of Perl 5 you may have available.

SEE ALSO

DTA::CAB::Server::HTTP::Handler(3pm), DTA::CAB::Server::HTTP(3pm), DTA::CAB(3pm), perl(1), ...