Handbook
Glossary
serve-directory ( filename -- response )
Vocabulary
http
.
server
.
static
Inputs
filename
an
object
Outputs
response
an
object
Definition
USING:
accessors
http.server.redirection
kernel
namespaces
sequences
urls
;
IN:
http.server.static
:
serve-directory
( filename -- response )
url
get
path>>
"/"
tail?
[
[
find-index
]
[
serve-file
]
[
list-directory
]
?if
]
[
drop
url
get
clone
[
"/"
append
]
change-path
<permanent-redirect>
]
if
;