From 3b30920a60f0e420738269287c21fd9a24df8530 Mon Sep 17 00:00:00 2001 From: Joris Vink Date: Sat, 4 May 2013 21:03:53 +0200 Subject: [PATCH] for now, until we properly handle a persistent HTTP connection for non spdy clients make sure we close the connection after handling the HTTP request. --- src/http.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/http.c b/src/http.c index 2fd831a..2fe52b3 100644 --- a/src/http.c +++ b/src/http.c @@ -246,10 +246,13 @@ http_process(void) else r = hdlr(req); - if (r != KORE_RESULT_ERROR) + if (r != KORE_RESULT_ERROR) { net_send_flush(req->owner); - else + if (req->owner->proto == CONN_PROTO_HTTP) + kore_server_disconnect(req->owner); + } else { kore_server_disconnect(req->owner); + } TAILQ_REMOVE(&http_requests, req, list); http_request_free(req);