Handbook
Glossary
send-status ( path file-info -- )
Vocabulary
gemini
.
server
.
private
Inputs
path
an
object
file-info
an
object
Outputs
None
Definition
USING:
accessors
combinators
formatting
io.files.types
kernel
mime.types
;
IN:
gemini.server.private
:
send-status
( path file-info -- )
type>>
{
{
+directory+
[
drop
"text/gemini"
]
}
{
+regular-file+
[
mime-type
]
}
[
2drop
f
]
}
case
"application/octet-stream"
or
"20 %s\r\n"
sprintf
write-utf8
;