diff --git a/http.c b/http.c index 8aa2b120..d6dfeea1 100644 --- a/http.c +++ b/http.c @@ -2822,6 +2822,10 @@ evhttp_send_reply_start(struct evhttp_request *req, int code, const char *reason) { evhttp_response_code_(req, code, reason); + + if (req->evcon == NULL) + return; + if (evhttp_find_header(req->output_headers, "Content-Length") == NULL && REQ_VERSION_ATLEAST(req, 1, 1) && evhttp_response_needs_body(req)) {