
http_wrapper.pl -- Server processing of an HTTP request
This library provides the core of the implementation of the HTTP
protocol at the server side and is mainly intended for internal use.
It is used by library(thread_httpd) and library(inet_httpd)
(deprecated).
Still, it provides a few predicates that are occasinally useful for applications:
X-Forwarded-For)
http_wrapper(:Goal, +In, +Out, -Close, +Options) is det
The goal is assumed to write the reply to current_output
preceeded by an HTTP header, closed by a blank line. The header
must contain a Content-type: <type> line. It may optionally
contain a line Transfer-encoding: chunked to request chunked
encoding.
Options:
http_wrap_spawned(:Goal, -Request, -Close) is det
http_spawned(+ThreadId)
http_send_header(+Header)
http_current_request(-Request) is semidet
http_peer(+Request, -PeerIP:atom) is semidetFastly-client-ipX-real-ipX-forwarded-for
http_relative_path(+AbsPath, -RelPath) is det