|serve_static( $cgi, $base )||
Takes a reference to the CGI object and a document root path, and
tries to serve a static file. Returns 0 if the file does not exist,
returns 1 on success.
This method sets the Date and Last-Modified HTTP headers when sending a response for a valid file. Further to this, the method supports clients which send an If-Modified-Since HTTP header in the request, it will return a 304 Not Modified response if the file is unchanged. See RFC-2616 for full details.
If the client makes a HEAD request then no message body will be returned in the response.
Bugs or wishlist requests should be submitted via http://rt.cpan.org/
The File::LibMagic module is used to detect the MIME-type of a file. The URI::Escape module is used for URI handling. The HTTP::Date module is used to format the timestamp in the Last-Modified HTTP header.
Stephen Quinney email@example.com
Thanks to Marcus Ramberg firstname.lastname@example.org and Simon Cozens for initial implementation.
Copyright 2006 - 2013. Stephen Quinney email@example.com
You may distribute this code under the same terms as Perl itself.
|perl v5.20.3||HTTP::SERVER::SIMPLE::STATIC (3)||2016-04-03|