libevent/libevent — pull request #50 by azat (2013-03-21 11:06:50+00:00)
Title: Pass http client error codes to callback

Add new callback for "internal" http request errors - error_cb.
It is useful to know why you callback called with NULL (i.e. it failed),
for example if you set max_body with evhttp_connection_set_max_body_size()
you must know that it failed because of body was longer than this size.

In this pull request I also replace some EVCON_HTTP_INVALID_HEADER with EVCON_HTTP_DATA_TOO_LONG.
Maybe I need to do this as a single patch?

Also I think we need to add test for this.
I will add it in next few days.