Handbook
Glossary
serve-cgi ( name -- response )
Vocabulary
http
.
server
.
cgi
Inputs
name
an
object
Outputs
response
an
object
Definition
USING:
accessors
http
http.server
io
io.backend
io.encodings
io.encodings.binary
io.launcher
io.streams.duplex
kernel
namespaces
;
IN:
http.server.cgi
:
serve-cgi
( name -- response )
<raw-response>
200
>>code
"CGI output follows"
>>message
swap
'[
binary
encode-output
output-stream
get
_
normalize-path
<cgi-process>
binary
<process-stream>
[
post-request?
[
request
get
data>>
data>>
write
flush
]
when
'[
_
stream-write
]
each-block
]
with-stream
]
>>body
;