Handbook
Glossary
cgi-variables ( script-path -- assoc )
Vocabulary
http
.
server
.
cgi
Inputs
script-path
an
object
Outputs
assoc
an
object
Definition
USING:
accessors
http
http.server
kernel
make
math.parser
namespaces
sequences
urls
urls.encoding
;
IN:
http.server.cgi
:
cgi-variables
( script-path -- assoc )
[
"CGI/1.0"
"GATEWAY_INTERFACE"
,,
"HTTP/"
request
get
version>>
append
"SERVER_PROTOCOL"
,,
"Factor"
"SERVER_SOFTWARE"
,,
[
"PATH_TRANSLATED"
,,
]
[
"SCRIPT_FILENAME"
,,
]
bi
url
get
path>>
"SCRIPT_NAME"
,,
url
get
host>>
"SERVER_NAME"
,,
url
get
port>>
number>string
"SERVER_PORT"
,,
""
"PATH_INFO"
,,
""
"REMOTE_HOST"
,,
""
"REMOTE_ADDR"
,,
""
"AUTH_TYPE"
,,
""
"REMOTE_USER"
,,
""
"REMOTE_IDENT"
,,
request
get
method>>
"REQUEST_METHOD"
,,
url
get
query>>
assoc>query
"QUERY_STRING"
,,
request
get
"cookie"
header
"HTTP_COOKIE"
,,
request
get
"user-agent"
header
"HTTP_USER_AGENT"
,,
request
get
"accept"
header
"HTTP_ACCEPT"
,,
post-request?
[
request
get
data>>
data>>
[
"CONTENT_TYPE"
,,
]
[
length
number>string
"CONTENT_LENGTH"
,,
]
bi
]
when
]
H{
}
make
;