Handbook
Glossary
(serve-static) ( path mime-type -- response )
Vocabulary
http
.
server
.
static
Inputs
path
an
object
mime-type
an
object
Outputs
response
an
object
Definition
USING:
accessors
destructors
http
http.server.responses
io.encodings.binary
io.files
io.files.info
kernel
;
IN:
http.server.static
:
(serve-static)
( path mime-type -- response )
[
[
binary
<file-reader>
&dispose
]
dip
<content>
binary
>>content-encoding
]
[
drop
file-info
[
size>>
]
[
modified>>
]
bi
]
2bi
[
"content-length"
set-header
]
[
"last-modified"
set-header
]
bi*
;