kc3-lang/libevent/http.c

Branch :


Log

Author Commit Date CI Message
4215c003 2018-02-11 16:28:58 Fix evhttp_connection_get_addr() fox incomming http connections Install conn_address of the bufferevent on incomping http connections (even though this is kind of subsytem violation, so let's fix it in a simplest way and thinkg about long-term solution). Fixes: #510 Closes: #595 (pick) (cherry picked from commit 367cd9e5c2b8e3f9b8dbed40bfe8a0ed79285c36)
0dfabd34 2018-02-13 17:43:02 http: remove message in case !Content-Length and Connection!=close Since [1] GET can have body, and hence for every incomming connection it will print this error. [1] db483e3b002b33890fc88cadd77f6fd1fccad2d2 ("Allow bodies for GET/DELETE/OPTIONS/CONNECT") Noticed-by: BotoX (irc) Refs: #408 (cherry picked from commit cd57e38c3f77d0f6a718d9c1f2e3ead78a98bd06)
123362e9 2018-01-09 21:44:57 http: fix leaks in evhttp_uriencode() Fixes: #584 (cherry picked from commit 61c21492680505706cad9240c39666ee3b56a89c)
7d1ffe64 2017-12-02 12:53:57 CONNECT method only takes an authority (cherry picked from commit 65eb529a9f4dd886d01a9d77ce6d971de9fb1b97)
b2581380 2017-11-04 19:13:28 Fix crashing http server when callback do not reply in place from *gencb* This is the second hunk of the first patch 5ff8eb26371c4dc56f384b2de35bea2d87814779 ("Fix crashing http server when callback do not reply in place") Fixes: #567 (cherry picked from commit 306747e51c1f0de679a3b165b9429418c89f8d6a)
23eb38b9 2017-10-29 22:53:41 Allow bodies for GET/DELETE/OPTIONS/CONNECT I checked with nginx, and via it's lua bindings it allows body for all this methods. Also everybody knows that some of web-servers allows body for GET even though this is not RFC conformant. Refs: #408 (cherry picked from commit db483e3b002b33890fc88cadd77f6fd1fccad2d2)
826f1134 2017-09-26 19:23:29 Do not crash when evhttp_send_reply_start() is called after a timeout. This fixes the crash reported in issue #509. The "would be nice" items discussed in #509 can be addressed separately. (cherry picked from commit 99d0a952dada771b91acf63f5208b994e80a2986)
5b40744d 2017-10-23 00:13:37 Fix crashing http server when callback do not reply in place General http callback looks like: static void http_cb(struct evhttp_request *req, void *arg) { evhttp_send_reply(req, HTTP_OK, "Everything is fine", NULL); } And they will work fine becuase in this case http will write request first, and during write preparation it will disable *read callback* (in evhttp_write_buffer()), but if we don't reply immediately, for example: static void http_cb(struct evhttp_request *req, void *arg) { return; } This will leave connection in incorrect state, and if another request will be written to the same connection libevent will abort with: [err] ../http.c: illegal connection state 7 Because it thinks that read for now is not possible, since there were no write. Fix this by disabling EV_READ entirely. We couldn't just reset callbacks because this will leave EOF detection, which we don't need, since user hasn't replied to callback yet. Reported-by: Cory Fields <cory@coryfields.com> (cherry picked from commit 5ff8eb26371c4dc56f384b2de35bea2d87814779)
7e91622b 2017-09-13 21:39:32 fix handling of close_notify (ssl) in http with openssl bufferevents Since it can arrive after we disabled events in that bufferevent and reseted fd, hence evhttp_error_cb() could be called after SSL_RECEIVED_SHUTDOWN. Closes: #557 (cherry picked from commit da3f2ba22adcabaf7355a90d537b4928d0c168d2)
db60ade8 2016-11-10 21:58:15 http: do not use local settings for Date header