]> granicus.if.org Git - libevent/commit
http: add callback to allow server to decline (and thereby close) incoming connections.
authorJohn Fremlin <john@fremlin.org>
Fri, 1 Dec 2017 01:29:32 +0000 (01:29 +0000)
committerAzat Khuzhin <a3at.mail@gmail.com>
Mon, 18 Dec 2017 00:00:04 +0000 (03:00 +0300)
commit727bcea130eb4beea9b1ea53604b9807f6819a9a
tree7f5ab96fb0fc4614e91688af92b8a7774bea2310
parent6e5c15d095d37036553d491b52d27fbbda08e7f2
http: add callback to allow server to decline (and thereby close) incoming connections.

This is important, as otherwise clients can easily exhaust the file
descriptors available on a libevent HTTP server, which can cause
problems in other code which does not handle EMFILE well: for example,
see https://github.com/bitcoin/bitcoin/issues/11368

Closes: #578 (patch cherry picked)
http-internal.h
http.c
include/event2/http.h
test/regress_http.c