extend/cowboy — pull request #323 by bfrog (2012-11-27 19:37:10+00:00)
Title: Error Terminate with Original Request when Possible

This change makes error_terminate/3 in cowboy_protocol and uses it whenever possible to use the original request record with all its attributes when responding with an error.

This makes onresponse much nicer to work with in cases such as dispatch 404 errors.

cowboy_protocol could build a request more incrementally instead of waiting for all the headers but I understand the reasoning here.