| Did you know ... | Search Documentation: |
| Predicate pwp_handler/2 |
:- use_module(library(http/http_pwp)).
pwp_handler(+Options,
+Request)library(http/http_dispatch). In the typical usage scenario,
one needs to define an http location and a file-search path that is used
as the root of the server. E.g., the following declarations create a
self-contained web-server for files in /web/pwp/.
user:file_search_path(pwp, '/web/pwp'). :- http_handler(root(.), pwp_handler([path_alias(pwp)]), [prefix]).
Options include:
index.pwp.
note Older versions allowed for repeating this option rather than
providing a list.true (default is false), allow for
?view=source to serve PWP file as source.
Security: PWP files contain Prolog goals that are executed
when the page is served. The directory tree served by pwp_handler/2
may therefore only contain trusted files. In particular, do not serve a
directory to which users can upload files. See library(pwp).
permission_error(index, http_location, Location) is raised
if the handler resolves to a directory that has no index.