extend/cowboy — pull request #681 by ferd (2014-03-12 18:13:29+00:00)
Title: Add cowboy_req:buffer_data/3

This function listens for and inspects its buffer until it has received
some amount of data (if any) and then returns.

This can be useful when, for example, multiple connections might be
listened to at once with a timeout to serve the first one to answer, or
in similar cases where work can be done while waiting for data on the
line.