4 Feb 07:35
Re: directory listing in hop?
<Manuel.Serrano <at> inria.fr>
2012-02-04 06:35:23 GMT
2012-02-04 06:35:23 GMT
Hi Sven,
> Which function in hop is called when hop automatically lists
> the contents of a directory on a hop server?
The function directory->response is in charge of returning a directory list.
It is defined in runtime/http_response.scm.
This can be overridden using a local hook. In the ~/.config/hop/hoprc.hop file
you may add something such as:
(hop-http-response-local-hook-add!
(lambda (req::http-request resp)
(if (directory? req.abspath)
... do whatever you want ...
resp)))
Cheers,
--
--
Manuel
RSS Feed