Project

General

Profile

URI_conditinal-max_keep_alive_requests2.patch

Move test to http_response_write_header() as in trunk. - roques, 2009-02-06 21:21

View differences:

response.c (working copy)
43 43
	buffer_append_string_len(b, CONST_STR_LEN(" "));
44 44
	buffer_append_string(b, get_http_status_name(con->http_status));
45 45

  
46
	/* disable keep-alive if requested */
47
	if (con->request_count > con->conf.max_keep_alive_requests) {
48
		con->keep_alive = 0;
49
	}
50

  
46 51
	if (con->request.http_version != HTTP_VERSION_1_1 || con->keep_alive == 0) {
47 52
		if (con->keep_alive) {
48 53
			response_header_overwrite(srv, con, CONST_STR_LEN("Connection"), CONST_STR_LEN("keep-alive"));
......
226 231
			log_error_write(srv, __FILE__, __LINE__,  "sb", "URI-query    : ", con->uri.query);
227 232
		}
228 233

  
229
		/* disable keep-alive if requested */
230

  
231
		if (con->request_count > con->conf.max_keep_alive_requests) {
232
			con->keep_alive = 0;
233
		}
234

  
235 234

  
236 235
		/**
237 236
		 *
238 237
		 * call plugins