Behaviours: cowboy_middleware.
See also: cowboy_http_handler.
Handler middleware.
Execute the handler given by the handler and handler_opts environment values. The result of this execution is added to the environment under the result value.
When using loop handlers, we are receiving data from the socket because we want to know when the socket gets closed. This is generally not an issue because these kinds of requests are generally not pipelined, and don't have a body. If they do have a body, this body is often read in the init/3 callback and this is no problem. Otherwise, this data accumulates in a buffer until we reach a certain threshold of 5000 bytes by default. This can be configured through the loop_max_buffer environment value. The request will be terminated with an {error, overflow} reason if this threshold is reached.Generated by EDoc, Aug 16 2014, 11:28:18.