Module Webs_cgi

module Webs_cgi: sig .. end
CGI connector.

Webs_cgi is a CGI connector. See how Webs.req values are derived from the CGI environment.

Important. This connector uses one non-standard CGI variable.

References.

Release 0.0.0-3-g2bbb3e4 - Daniel B├╝nzli <daniel.buenzl i@erratique.ch>



Configuration keys

Default configuration keys.


val vars : string list Webs.Dict.key
vars is a list of CGI environment variables that are added to the request's Webs.Req.headers in the request if they are defined. See here for details about how the header is named.

The variables must be valid HTTP tokens, otherwise the connector will error.


Connector


val connect : Webs.connector

Requests

A Webs.req value is constructed from the CGI environment as follows.



Requests

A Webs.req value is constructed from the CGI environment as follows.



Responses

The response status and headers are written on stdout. The response body is handled as follows: