kore

Kore is a web application platform for writing scalable, concurrent web based processes in C or Python.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit a20fb00789120182ebdd91c7006bdfbb3f19d421
parent e95d9cc88ec3bff3aa74938d9730ad18a30db497
Author: Joris Vink <joris@coders.se>
Date:   Sun,  2 Aug 2015 16:53:40 +0200

req can be NULL if we are coming from an error path.

Diffstat:
src/http.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/http.c b/src/http.c @@ -1247,7 +1247,8 @@ http_response_normal(struct http_request *req, struct connection *c, } } - if (req->owner->proto != CONN_PROTO_WEBSOCKET) { + /* Note that req CAN be NULL. */ + if (req != NULL && req->owner->proto != CONN_PROTO_WEBSOCKET) { if (http_keepalive_time && connection_close == 0) { kore_buf_appendf(header_buf, "connection: keep-alive\r\n");