Project

General

Profile

connection_close.patch

helmut, 2019-01-09 07:44

View differences:

src/response.c
36 36
	/* disable keep-alive if requested */
37 37
	if (con->request_count > con->conf.max_keep_alive_requests || 0 == con->conf.max_keep_alive_idle) {
38 38
		con->keep_alive = 0;
39
	/* connection_handle_response_end_state will disable keep_alive later.
40
	 * Disabling here already to send Connection: close to the client. */
41
	} else if (con->request.content_length != con->request_content_queue->bytes_in) {
42
		con->keep_alive = 0;
39 43
	} else {
40 44
		con->keep_alive_idle = con->conf.max_keep_alive_idle;
41 45
	}