View Source HTTP/1 Handler
Within a Bandit server, an HTTP/1 connection is modeled as a single process. This process is tied to the lifecycle of the underlying TCP connection; in the case of an HTTP client which makes use of HTTP's keep-alive feature to make multiple requests on the same connection, all of these requests will be serviced by this same process.
The execution model to handle a given request is quite straightforward: the
underlying Thousand Island library
Bandit.HTTP1.Handler.handle_data/3, which will then attmept to parse
the headers of the request by calling
Assuming the common case, this list of headers will then be passed to
Bandit.Pipeline.run/6, which will construct a
Plug.Conn structure to
represent the request and subsequently pass it to the configured
All of this is exhaustively tested. Tests are located in
are broadly either concerned with testing network-facing aspects of the
implementation (ie: how well Bandit satisfies the relevant RFCs) or the Plug-facing
aspects of the implementation.
Unfortunately, there is no HTTP/1 equivalent to the external h2spec test suite.