HTTP Gateway

Models

Mongrel2

From [Mongrel2-01]:

<request> ::= <server> ' ' <connection> ' ' <path> ' ' <headers> <body>

<response> ::= <server> ' ' <connections> ' ' <chunk>

<server> ::= <uuid>
<connection> ::= <integer>
<connections> ::= <tnetstring{ ( <connection> ' ' )+ ',' }>

<headers> ::= <tnetstring{ <json-object> }>
<body> ::= <tnetstring{ <byte>* }>

<chunk> ::= <initial-chunk> | <data-chunk> | <final-chunk>
<initial-chunk> ::= <tnetstring{
    'HTTP/1.1' ' ' <http-code> <http-status> '\r\n'
    ( <header-name> ': ' <header-data> '\r\n' )*
    '\r\n'
    <byte>*
}>
<data-chunk> ::= <tnetstring{ <byte>* }>
<final-chunk> ::= <tnetstring{}>

<tnetstring{ <data> }> ::= <size{ <data> }> ':' <data> ','