Availability:
:- use_module(library(http/http_dispatch)).
[det]http_reply_file(+FileSpec,
+Options, +Request)- cache(+Boolean)
- If
true(default), handle If-modified-since and send modification time. - mime_type(+Type)
- Overrule mime-type guessing from the filename as provided by file_mime_type/2.
- static_gzip(+Boolean)
- If
true(defaultfalse) and, in addition to the plain file, there is a.gzfile that is not older than the plain file and the client accepsgzipencoding, send the compressed file withTransfer-encoding: gzip. - cached_gzip(+Boolean)
- If
true(defaultfalse) the system maintains cached gzipped files in a directory accessible using the file search pathhttp_gzip_cacheand serves these similar to thestatic_gzip(true)option. If the gzip file does not exist or is older than the input the file is recreated. - unsafe(+Boolean)
- If
false(default), validate that FileSpec does not contain references to parent directories. E.g., specifications such aswww('../../etc/passwd')are not allowed. - headers(+List)
- Provides additional reply-header fields, encoded as a list of Field(Value).
If caching is not disabled, it processes the request headers
If-modified-since and Range.
- throws
- -
http_reply(not_modified)
-http_reply(file(MimeType, Path))