SOURCES: lighttpd-branch.diff - up to r2303: * close connection after red...

glen glen at pld-linux.org
Fri Sep 19 16:37:15 CEST 2008


Author: glen                         Date: Fri Sep 19 14:37:15 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- up to r2303:
  * close connection after redirect in trigger_b4_dl (thx icy)
  * close connection in mod_magnet if returned status code
  * fix bug with IPv6 in mod_evasive (#1579)
  * fix scgi HTTP/1.* status parsing (#1638), found by met at uberstats.com
  * [tests] fixed system, use foreground daemons and waitpid
  * [tests] removed pidfile from test system
  * [tests] fixed tests needing php running (if not running on port 1026, search php in env[PHP] or /usr/bin/php-cgi)
  * fixed typo in mod_accesslog (#1699)
  * replaced buffer_{append,copy}_string with the _len variant where possible (#1732) (thx crypt)
  * case insensitive match for secdownload md5 token (#1710)
  * Handle only HEAD, GET and POST in mod_dirlisting (same as in staticfile) (#1687)
  * fixed mod_secdownload problem with unsigned time_t (#1688)
  * handle EAGAIN and EINTR for freebsd sendfile (#1675)
  * Use filedescriptor 0 for mod_scgi spawn socket, redirect STDERR to /dev/null (#1716)
  * fixed round-robin balancing in mod_proxy (#1715)
  * fixed EINTR handling for waitpid in mod_fastcgi
  * mod_{fast,s}cgi: overwrite environment variables (#1722)
  * inserted many con->mode checks; they should prevent two modules to handle the same request if they shouldn't (#631)
  * fixed url encoding to encode more characters (#266)
  * allow digits in [s]cgi env vars (#1712)
  * fixed dropping last character of evhost pattern (#161)
  * print helpful error message on conditionals in global block (#1550)
  * decode url before matching in mod_rewrite (#1720)
  * fixed conditional patching of ldap filter (#1564)
  * Match headers case insensitive in response (removing of X-{Sendfile,LIGHTTPD-*}, catching Date/Server)
  * fixed bug with case-insensitive filenames in mod_userdir (#1589), spotted by "anders1"
  * fixed format string bugs in mod_accesslog for SYSLOG
  * replaced fprintf with log_error_write in fastcgi debug
  * fixed mem leak in ssi expression parser (#1753), thx Take5k
  * hide some ssl errors per default, enable them with debug.log-ssl-noise (#397)
  * do not send content-encoding for 304 (#1754), thx yzlai
  * fix segfault for stat_cache(fam) calls with relative path (without '/', can be triggered by x-sendfile) (#1750)
  * fix splitting of auth-ldap filter
  * workaround ldap connection leak if a ldap connection failed (restarting ldap)

---- Files affected:
SOURCES:
   lighttpd-branch.diff (1.38 -> 1.39) 

---- Diffs:

================================================================
Index: SOURCES/lighttpd-branch.diff
diff -u SOURCES/lighttpd-branch.diff:1.38 SOURCES/lighttpd-branch.diff:1.39
--- SOURCES/lighttpd-branch.diff:1.38	Mon Jul 14 17:53:06 2008
+++ SOURCES/lighttpd-branch.diff	Fri Sep 19 16:37:09 2008
@@ -1,7 +1,7 @@
 Index: lighttpd.spec.in
 ===================================================================
---- lighttpd.spec.in	(.../tags/lighttpd-1.4.19)	(revision 2199)
-+++ lighttpd.spec.in	(.../branches/lighttpd-1.4.x)	(revision 2199)
+--- lighttpd.spec.in	(.../tags/lighttpd-1.4.19)	(revision 2303)
++++ lighttpd.spec.in	(.../branches/lighttpd-1.4.x)	(revision 2303)
 @@ -1,83 +0,0 @@
 -Summary: A fast webserver with minimal memory-footprint (lighttpd)
 -Name: lighttpd
@@ -90,8 +90,8 @@
 ===================================================================
 Index: src/mod_ssi_exprparser.h
 ===================================================================
---- src/mod_ssi_exprparser.h	(.../tags/lighttpd-1.4.19)	(revision 2199)
-+++ src/mod_ssi_exprparser.h	(.../branches/lighttpd-1.4.x)	(revision 2199)
+--- src/mod_ssi_exprparser.h	(.../tags/lighttpd-1.4.19)	(revision 2303)
++++ src/mod_ssi_exprparser.h	(.../branches/lighttpd-1.4.x)	(revision 2303)
 @@ -1,12 +0,0 @@
 -#define TK_AND                             1
 -#define TK_OR                              2
@@ -107,8 +107,26 @@
 -#define TK_VALUE                          12
 Index: src/configfile-glue.c
 ===================================================================
---- src/configfile-glue.c	(.../tags/lighttpd-1.4.19)	(revision 2199)
-+++ src/configfile-glue.c	(.../branches/lighttpd-1.4.x)	(revision 2199)
+--- src/configfile-glue.c	(.../tags/lighttpd-1.4.19)	(revision 2303)
++++ src/configfile-glue.c	(.../branches/lighttpd-1.4.x)	(revision 2303)
+@@ -155,7 +155,7 @@
+ 		/* touched */
+ 		touched = data_string_init();
+ 
+-		buffer_copy_string(touched->value, "");
++		buffer_copy_string_len(touched->value, CONST_STR_LEN(""));
+ 		buffer_copy_string_buffer(touched->key, du->key);
+ 
+ 		array_insert_unique(srv->config_touched, (data_unset *)touched);
+@@ -260,7 +260,7 @@
+ 				if (ck_colon) {
+ 					/* condition "host:port" but client send "host" */
+ 					buffer_copy_string_buffer(srv->cond_check_buf, l);
+-					BUFFER_APPEND_STRING_CONST(srv->cond_check_buf, ":");
++					buffer_append_string_len(srv->cond_check_buf, CONST_STR_LEN(":"));
+ 					buffer_append_long(srv->cond_check_buf, sock_addr_get_port(&(srv_sock->addr)));
+ 					l = srv->cond_check_buf;
+ 				} else if (!ck_colon) {
 @@ -529,7 +529,7 @@
  int config_append_cond_match_buffer(connection *con, data_config *dc, buffer *buf, int n)
  {
@@ -120,8 +138,26 @@
  
 Index: src/mod_cgi.c
 ===================================================================
---- src/mod_cgi.c	(.../tags/lighttpd-1.4.19)	(revision 2199)
-+++ src/mod_cgi.c	(.../branches/lighttpd-1.4.x)	(revision 2199)
+--- src/mod_cgi.c	(.../tags/lighttpd-1.4.19)	(revision 2303)
++++ src/mod_cgi.c	(.../branches/lighttpd-1.4.x)	(revision 2303)
+@@ -912,7 +912,7 @@
+ 				buffer_reset(p->tmp_buf);
+ 
+ 				if (0 != strcasecmp(ds->key->ptr, "CONTENT-TYPE")) {
+-					buffer_copy_string(p->tmp_buf, "HTTP_");
++					buffer_copy_string_len(p->tmp_buf, CONST_STR_LEN("HTTP_"));
+ 					p->tmp_buf->used--; /* strip \0 after HTTP_ */
+ 				}
+ 
+@@ -949,7 +949,7 @@
+ 
+ 				for (j = 0; j < ds->key->used - 1; j++) {
+ 					p->tmp_buf->ptr[p->tmp_buf->used++] =
+-						isalpha((unsigned char)ds->key->ptr[j]) ?
++						light_isalnum((unsigned char)ds->key->ptr[j]) ?
+ 						toupper((unsigned char)ds->key->ptr[j]) : '_';
+ 				}
+ 				p->tmp_buf->ptr[p->tmp_buf->used++] = '\0';
 @@ -987,6 +987,8 @@
  			*c = '/';
  		}
@@ -171,11 +207,129 @@
  					break;
  				}
  				chunkqueue_remove_finished_chunks(cq);
+@@ -1174,6 +1180,8 @@
+ 	plugin_data *p = p_d;
+ 	buffer *fn = con->physical.path;
+ 
++	if (con->mode != DIRECT) return HANDLER_GO_ON;
++
+ 	if (fn->used == 0) return HANDLER_GO_ON;
+ 
+ 	mod_cgi_patch_connection(srv, con, p);
+@@ -1189,6 +1197,7 @@
+ 
+ 		if (0 == strncmp(fn->ptr + s_len - ct_len, ds->key->ptr, ct_len)) {
+ 			if (cgi_create_env(srv, con, p, ds->value)) {
++				con->mode = DIRECT;
+ 				con->http_status = 500;
+ 
+ 				buffer_reset(con->physical.path);
+Index: src/mod_secure_download.c
+===================================================================
+--- src/mod_secure_download.c	(.../tags/lighttpd-1.4.19)	(revision 2303)
++++ src/mod_secure_download.c	(.../branches/lighttpd-1.4.x)	(revision 2303)
+@@ -204,6 +204,8 @@
+ 	time_t ts = 0;
+ 	size_t i;
+ 
++	if (con->mode != DIRECT) return HANDLER_GO_ON;
++
+ 	if (con->uri.path->used == 0) return HANDLER_GO_ON;
+ 
+ 	mod_secdownload_patch_connection(srv, con, p);
+@@ -243,8 +245,8 @@
+ 	}
+ 
+ 	/* timed-out */
+-	if (srv->cur_ts - ts > p->conf.timeout ||
+-	    srv->cur_ts - ts < -p->conf.timeout) {
++	if ( (srv->cur_ts > ts && srv->cur_ts - ts > p->conf.timeout) ||
++	     (srv->cur_ts < ts && ts - srv->cur_ts > p->conf.timeout) ) {
+ 		/* "Gone" as the url will never be valid again instead of "408 - Timeout" where the request may be repeated */
+ 		con->http_status = 410;
+ 
+@@ -268,7 +270,7 @@
+ 
+ 	buffer_copy_string_hex(p->md5, (char *)HA1, 16);
+ 
+-	if (0 != strncmp(md5_str, p->md5->ptr, 32)) {
++	if (0 != strncasecmp(md5_str, p->md5->ptr, 32)) {
+ 		con->http_status = 403;
+ 
+ 		log_error_write(srv, __FILE__, __LINE__, "sss",
+Index: src/array.c
+===================================================================
+--- src/array.c	(.../tags/lighttpd-1.4.19)	(revision 2303)
++++ src/array.c	(.../branches/lighttpd-1.4.x)	(revision 2303)
+@@ -330,30 +330,30 @@
+ 	a = array_init();
+ 
+ 	ds = data_string_init();
+-	buffer_copy_string(ds->key, "abc");
+-	buffer_copy_string(ds->value, "alfrag");
++	buffer_copy_string_len(ds->key, CONST_STR_LEN("abc"));
++	buffer_copy_string_len(ds->value, CONST_STR_LEN("alfrag"));
+ 
+ 	array_insert_unique(a, (data_unset *)ds);
+ 
+ 	ds = data_string_init();
+-	buffer_copy_string(ds->key, "abc");
+-	buffer_copy_string(ds->value, "hameplman");
++	buffer_copy_string_len(ds->key, CONST_STR_LEN("abc"));
++	buffer_copy_string_len(ds->value, CONST_STR_LEN("hameplman"));
+ 
+ 	array_insert_unique(a, (data_unset *)ds);
+ 
+ 	ds = data_string_init();
+-	buffer_copy_string(ds->key, "123");
+-	buffer_copy_string(ds->value, "alfrag");
++	buffer_copy_string_len(ds->key, CONST_STR_LEN("123"));
++	buffer_copy_string_len(ds->value, CONST_STR_LEN("alfrag"));
+ 
+ 	array_insert_unique(a, (data_unset *)ds);
+ 
+ 	dc = data_count_init();
+-	buffer_copy_string(dc->key, "def");
++	buffer_copy_string_len(dc->key, CONST_STR_LEN("def"));
+ 
+ 	array_insert_unique(a, (data_unset *)dc);
+ 
+ 	dc = data_count_init();
+-	buffer_copy_string(dc->key, "def");
++	buffer_copy_string_len(dc->key, CONST_STR_LEN("def"));
+ 
+ 	array_insert_unique(a, (data_unset *)dc);
+ 
+Index: src/base.h
+===================================================================
+--- src/base.h	(.../tags/lighttpd-1.4.19)	(revision 2303)
++++ src/base.h	(.../branches/lighttpd-1.4.x)	(revision 2303)
+@@ -259,6 +259,7 @@
+ 	unsigned short log_request_handling;
+ 	unsigned short log_response_header;
+ 	unsigned short log_condition_handling;
++	unsigned short log_ssl_noise;
+ 
+ 
+ 	/* server wide */
 Index: src/mod_rewrite.c
 ===================================================================
---- src/mod_rewrite.c	(.../tags/lighttpd-1.4.19)	(revision 2199)
-+++ src/mod_rewrite.c	(.../branches/lighttpd-1.4.x)	(revision 2199)
-@@ -385,8 +385,7 @@
+--- src/mod_rewrite.c	(.../tags/lighttpd-1.4.19)	(revision 2303)
++++ src/mod_rewrite.c	(.../branches/lighttpd-1.4.x)	(revision 2303)
+@@ -350,7 +350,11 @@
+ 
+ 	if (!p->conf.rewrite) return HANDLER_GO_ON;
+ 
+-	buffer_copy_string_buffer(p->match_buf, con->request.uri);
++	buffer_copy_string_buffer(p->match_buf, con->uri.path);
++	if (con->uri.query->used > 0) {
++		buffer_append_string_len(p->match_buf, CONST_STR_LEN("?"));
++		buffer_append_string_buffer(p->match_buf, con->uri.query);
++	}
+ 
+ 	for (i = 0; i < p->conf.rewrite->used; i++) {
+ 		pcre *match;
+@@ -385,8 +389,7 @@
  
  			start = 0; end = pattern_len;
  			for (k = 0; k < pattern_len; k++) {
@@ -185,7 +339,7 @@
  					/* got one */
  
  					size_t num = pattern[k + 1] - '0';
-@@ -395,7 +394,10 @@
+@@ -395,7 +398,10 @@
  
  					buffer_append_string_len(con->request.uri, pattern + start, end - start);
  
@@ -199,8 +353,8 @@
  							buffer_append_string(con->request.uri, list[num]);
 Index: src/lempar.c
 ===================================================================
---- src/lempar.c	(.../tags/lighttpd-1.4.19)	(revision 2199)
-+++ src/lempar.c	(.../branches/lighttpd-1.4.x)	(revision 2199)
+--- src/lempar.c	(.../tags/lighttpd-1.4.19)	(revision 2303)
++++ src/lempar.c	(.../branches/lighttpd-1.4.x)	(revision 2303)
 @@ -210,7 +210,7 @@
  */
  const char *ParseTokenName(int tokenType){
@@ -248,8 +402,8 @@
  %%
 Index: src/connections.c
 ===================================================================
---- src/connections.c	(.../tags/lighttpd-1.4.19)	(revision 2199)
-+++ src/connections.c	(.../branches/lighttpd-1.4.x)	(revision 2199)
+--- src/connections.c	(.../tags/lighttpd-1.4.19)	(revision 2303)
++++ src/connections.c	(.../branches/lighttpd-1.4.x)	(revision 2303)
 @@ -199,6 +199,7 @@
  
  	/* don't resize the buffer if we were in SSL_ERROR_WANT_* */
@@ -258,7 +412,28 @@
  	do {
  		if (!con->ssl_error_want_reuse_buffer) {
  			b = buffer_init();
-@@ -299,6 +300,8 @@
+@@ -275,9 +276,19 @@
+ 			/* fall thourgh */
+ 		default:
+ 			while((ssl_err = ERR_get_error())) {
++				switch (ERR_GET_REASON(ssl_err)) {
++				case SSL_R_SSL_HANDSHAKE_FAILURE:
++				case SSL_R_TLSV1_ALERT_UNKNOWN_CA:
++				case SSL_R_SSLV3_ALERT_CERTIFICATE_UNKNOWN:
++				case SSL_R_SSLV3_ALERT_BAD_CERTIFICATE:
++					if (!con->conf.log_ssl_noise) continue;
++					break;
++				default:
++					break;
++				}
+ 				/* get all errors from the error-queue */
+ 				log_error_write(srv, __FILE__, __LINE__, "sds", "SSL:",
+-						r, ERR_error_string(ssl_err, NULL));
++				                r, ERR_error_string(ssl_err, NULL));
+ 			}
+ 			break;
+ 		}
+@@ -299,6 +310,8 @@
  
  	return 0;
  #else
@@ -267,7 +442,7 @@
  	return -1;
  #endif
  }
-@@ -427,21 +430,22 @@
+@@ -427,21 +440,22 @@
  	}
  
  	switch(con->http_status) {
@@ -303,7 +478,7 @@
  		con->file_finished = 0;
  
  		buffer_reset(con->physical.path);
-@@ -451,7 +455,8 @@
+@@ -451,7 +465,8 @@
  			stat_cache_entry *sce = NULL;
  
  			buffer_copy_string_buffer(con->physical.path, con->conf.errorfile_prefix);
@@ -313,7 +488,42 @@
  
  			if (HANDLER_ERROR != stat_cache_get_entry(srv, con, con->physical.path, &sce)) {
  				con->file_finished = 1;
-@@ -497,30 +502,7 @@
+@@ -470,57 +485,34 @@
+ 			b = chunkqueue_get_append_buffer(con->write_queue);
+ 
+ 			/* build default error-page */
+-			buffer_copy_string(b,
++			buffer_copy_string_len(b, CONST_STR_LEN(
+ 					   "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n"
+ 					   "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n"
+ 					   "         \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n"
+ 					   "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">\n"
+ 					   " <head>\n"
+-					   "  <title>");
++					   "  <title>"));
+ 			buffer_append_long(b, con->http_status);
+-			buffer_append_string(b, " - ");
++			buffer_append_string_len(b, CONST_STR_LEN(" - "));
+ 			buffer_append_string(b, get_http_status_name(con->http_status));
+ 
+-			buffer_append_string(b,
++			buffer_append_string_len(b, CONST_STR_LEN(
+ 					     "</title>\n"
+ 					     " </head>\n"
+ 					     " <body>\n"
+-					     "  <h1>");
++					     "  <h1>"));
+ 			buffer_append_long(b, con->http_status);
+-			buffer_append_string(b, " - ");
++			buffer_append_string_len(b, CONST_STR_LEN(" - "));
+ 			buffer_append_string(b, get_http_status_name(con->http_status));
+ 
+-			buffer_append_string(b,"</h1>\n"
++			buffer_append_string_len(b, CONST_STR_LEN("</h1>\n"
+ 					     " </body>\n"
+ 					     "</html>\n"
+-					     );
++					     ));
  
  			response_header_overwrite(srv, con, CONST_STR_LEN("Content-Type"), CONST_STR_LEN("text/html"));
  		}
@@ -344,7 +554,7 @@
  	}
  
  	if (con->file_finished) {
-@@ -544,7 +526,7 @@
+@@ -544,7 +536,7 @@
  				data_string *ds;
  				/* no Content-Body, no Content-Length */
  				if (NULL != (ds = (data_string*) array_get_element(con->response.headers, "Content-Length"))) {
@@ -353,7 +563,7 @@
  				}
  			} else if (qlen > 0 || con->request.http_method != HTTP_METHOD_HEAD) {
  				/* qlen = 0 is important for Redirects (301, ...) as they MAY have
-@@ -846,7 +828,7 @@
+@@ -846,7 +838,7 @@
  	}
  
  	/* The cond_cache gets reset in response.c */
@@ -362,7 +572,7 @@
  
  #ifdef USE_OPENSSL
  	if (con->ssl_error_want_reuse_buffer) {
-@@ -1668,21 +1650,51 @@
+@@ -1668,21 +1660,51 @@
  			}
  #ifdef USE_OPENSSL
  			if (srv_sock->is_ssl) {
@@ -421,10 +631,80 @@
  #endif
  
  			switch(con->mode) {
+Index: src/mod_staticfile.c
+===================================================================
+--- src/mod_staticfile.c	(.../tags/lighttpd-1.4.19)	(revision 2303)
++++ src/mod_staticfile.c	(.../branches/lighttpd-1.4.x)	(revision 2303)
+@@ -282,22 +282,22 @@
+ 
+ 				b = chunkqueue_get_append_buffer(con->write_queue);
+ 
+-				buffer_copy_string(b, "\r\n--");
++				buffer_copy_string_len(b, CONST_STR_LEN("\r\n--"));
+ 				buffer_append_string(b, boundary);
+ 
+ 				/* write Content-Range */
+-				buffer_append_string(b, "\r\nContent-Range: bytes ");
++				buffer_append_string_len(b, CONST_STR_LEN("\r\nContent-Range: bytes "));
+ 				buffer_append_off_t(b, start);
+-				buffer_append_string(b, "-");
++				buffer_append_string_len(b, CONST_STR_LEN("-"));
+ 				buffer_append_off_t(b, end);
+-				buffer_append_string(b, "/");
++				buffer_append_string_len(b, CONST_STR_LEN("/"));
+ 				buffer_append_off_t(b, sce->st.st_size);
+ 
+-				buffer_append_string(b, "\r\nContent-Type: ");
++				buffer_append_string_len(b, CONST_STR_LEN("\r\nContent-Type: "));
+ 				buffer_append_string_buffer(b, content_type);
+ 
+ 				/* write END-OF-HEADER */
+-				buffer_append_string(b, "\r\n\r\n");
++				buffer_append_string_len(b, CONST_STR_LEN("\r\n\r\n"));
+ 
+ 				con->response.content_length += b->used - 1;
+ 
+@@ -325,7 +325,7 @@
+ 
+ 		/* set header-fields */
+ 
+-		buffer_copy_string(p->range_buf, "multipart/byteranges; boundary=");
++		buffer_copy_string_len(p->range_buf, CONST_STR_LEN("multipart/byteranges; boundary="));
+ 		buffer_append_string(p->range_buf, boundary);
+ 
+ 		/* overwrite content-type */
+@@ -333,11 +333,11 @@
+ 	} else {
+ 		/* add Content-Range-header */
+ 
+-		buffer_copy_string(p->range_buf, "bytes ");
++		buffer_copy_string_len(p->range_buf, CONST_STR_LEN("bytes "));
+ 		buffer_append_off_t(p->range_buf, start);
+-		buffer_append_string(p->range_buf, "-");
++		buffer_append_string_len(p->range_buf, CONST_STR_LEN("-"));
+ 		buffer_append_off_t(p->range_buf, end);
+-		buffer_append_string(p->range_buf, "/");
++		buffer_append_string_len(p->range_buf, CONST_STR_LEN("/"));
+ 		buffer_append_off_t(p->range_buf, sce->st.st_size);
+ 
+ 		response_header_insert(srv, con, CONST_STR_LEN("Content-Range"), CONST_BUF_LEN(p->range_buf));
+Index: src/network.c
+===================================================================
+--- src/network.c	(.../tags/lighttpd-1.4.19)	(revision 2303)
++++ src/network.c	(.../branches/lighttpd-1.4.x)	(revision 2303)
+@@ -494,7 +494,7 @@
+ 	b = buffer_init();
+ 
+ 	buffer_copy_string_buffer(b, srv->srvconf.bindhost);
+-	buffer_append_string(b, ":");
++	buffer_append_string_len(b, CONST_STR_LEN(":"));
+ 	buffer_append_long(b, srv->srvconf.port);
+ 
+ 	if (0 != network_server_init(srv, b, srv->config_storage[0])) {
 Index: src/configfile.c
 ===================================================================
---- src/configfile.c	(.../tags/lighttpd-1.4.19)	(revision 2199)
-+++ src/configfile.c	(.../branches/lighttpd-1.4.x)	(revision 2199)
+--- src/configfile.c	(.../tags/lighttpd-1.4.19)	(revision 2303)
++++ src/configfile.c	(.../branches/lighttpd-1.4.x)	(revision 2303)
 @@ -7,6 +7,7 @@
  #include <string.h>
  #include <stdio.h>
@@ -433,7 +713,110 @@
  #include <assert.h>
  
  #include "server.h"
-@@ -305,9 +306,6 @@
+@@ -74,24 +75,25 @@
+ 		{ "debug.log-request-handling",  NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_SERVER },     /* 32 */
+ 		{ "debug.log-response-header",   NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_SERVER },     /* 33 */
+ 		{ "debug.log-request-header",    NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_SERVER },     /* 34 */
++		{ "debug.log-ssl-noise",         NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_SERVER },     /* 35 */
+ 
+-		{ "server.protocol-http11",      NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_SERVER },     /* 35 */
+-		{ "debug.log-request-header-on-error", NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_SERVER }, /* 36 */
+-		{ "debug.log-state-handling",    NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_SERVER },     /* 37 */
+-		{ "ssl.ca-file",                 NULL, T_CONFIG_STRING, T_CONFIG_SCOPE_SERVER },      /* 38 */
++		{ "server.protocol-http11",      NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_SERVER },     /* 36 */
++		{ "debug.log-request-header-on-error", NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_SERVER }, /* 37 */
++		{ "debug.log-state-handling",    NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_SERVER },     /* 38 */
++		{ "ssl.ca-file",                 NULL, T_CONFIG_STRING, T_CONFIG_SCOPE_SERVER },      /* 39 */
+ 
+-		{ "server.errorlog-use-syslog",  NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_SERVER },     /* 39 */
+-		{ "server.range-requests",       NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_CONNECTION }, /* 40 */
+-		{ "server.stat-cache-engine",    NULL, T_CONFIG_STRING, T_CONFIG_SCOPE_CONNECTION },  /* 41 */
+-		{ "server.max-connections",      NULL, T_CONFIG_SHORT, T_CONFIG_SCOPE_SERVER },       /* 42 */
+-		{ "server.network-backend",      NULL, T_CONFIG_STRING, T_CONFIG_SCOPE_CONNECTION },  /* 43 */
+-		{ "server.upload-dirs",          NULL, T_CONFIG_ARRAY, T_CONFIG_SCOPE_CONNECTION },   /* 44 */
+-		{ "server.core-files",           NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_CONNECTION }, /* 45 */
+-		{ "ssl.cipher-list",             NULL, T_CONFIG_STRING, T_CONFIG_SCOPE_SERVER },      /* 46 */
+-		{ "ssl.use-sslv2",               NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_CONNECTION }, /* 47 */
+-		{ "etag.use-inode",             NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_SERVER }, /* 48 */
+-		{ "etag.use-mtime",             NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_SERVER }, /* 49 */
+-		{ "etag.use-size",             NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_SERVER }, /* 50 */
++		{ "server.errorlog-use-syslog",  NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_SERVER },     /* 40 */
++		{ "server.range-requests",       NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_CONNECTION }, /* 41 */
++		{ "server.stat-cache-engine",    NULL, T_CONFIG_STRING, T_CONFIG_SCOPE_CONNECTION },  /* 42 */
++		{ "server.max-connections",      NULL, T_CONFIG_SHORT, T_CONFIG_SCOPE_SERVER },       /* 43 */
++		{ "server.network-backend",      NULL, T_CONFIG_STRING, T_CONFIG_SCOPE_CONNECTION },  /* 44 */
++		{ "server.upload-dirs",          NULL, T_CONFIG_ARRAY, T_CONFIG_SCOPE_CONNECTION },   /* 45 */
++		{ "server.core-files",           NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_CONNECTION }, /* 46 */
++		{ "ssl.cipher-list",             NULL, T_CONFIG_STRING, T_CONFIG_SCOPE_SERVER },      /* 47 */
++		{ "ssl.use-sslv2",               NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_CONNECTION }, /* 48 */
++		{ "etag.use-inode",             NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_SERVER }, /* 49 */
++		{ "etag.use-mtime",             NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_SERVER }, /* 50 */
++		{ "etag.use-size",             NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_SERVER }, /* 51 */
+ 		{ "server.host",                 "use server.bind instead", T_CONFIG_DEPRECATED, T_CONFIG_SCOPE_UNSET },
+ 		{ "server.docroot",              "use server.document-root instead", T_CONFIG_DEPRECATED, T_CONFIG_SCOPE_UNSET },
+ 		{ "server.virtual-root",         "load mod_simple_vhost and use simple-vhost.server-root instead", T_CONFIG_DEPRECATED, T_CONFIG_SCOPE_UNSET },
+@@ -120,18 +122,18 @@
+ 
+ 	cv[13].destination = &(srv->srvconf.max_worker);
+ 	cv[23].destination = &(srv->srvconf.max_fds);
+-	cv[36].destination = &(srv->srvconf.log_request_header_on_error);
+-	cv[37].destination = &(srv->srvconf.log_state_handling);
++	cv[37].destination = &(srv->srvconf.log_request_header_on_error);
++	cv[38].destination = &(srv->srvconf.log_state_handling);
+ 
+-	cv[39].destination = &(srv->srvconf.errorlog_use_syslog);
++	cv[40].destination = &(srv->srvconf.errorlog_use_syslog);
+ 
+ 	stat_cache_string = buffer_init();
+-	cv[41].destination = stat_cache_string;
+-	cv[43].destination = srv->srvconf.network_backend;
+-	cv[44].destination = srv->srvconf.upload_tempdirs;
+-	cv[45].destination = &(srv->srvconf.enable_cores);
++	cv[42].destination = stat_cache_string;
++	cv[44].destination = srv->srvconf.network_backend;
++	cv[45].destination = srv->srvconf.upload_tempdirs;
++	cv[46].destination = &(srv->srvconf.enable_cores);
+ 
+-	cv[42].destination = &(srv->srvconf.max_conns);
++	cv[43].destination = &(srv->srvconf.max_conns);
+ 	cv[12].destination = &(srv->srvconf.max_request_size);
+ 	srv->config_storage = calloc(1, srv->config_context->used * sizeof(specific_config *));
+ 
+@@ -204,16 +206,17 @@
+ 		cv[32].destination = &(s->log_request_handling);
+ 		cv[33].destination = &(s->log_response_header);
+ 		cv[34].destination = &(s->log_request_header);
++		cv[35].destination = &(s->log_ssl_noise);
+ 
+-		cv[35].destination = &(s->allow_http11);
+-		cv[38].destination = s->ssl_ca_file;
+-		cv[40].destination = &(s->range_requests);
++		cv[36].destination = &(s->allow_http11);
++		cv[39].destination = s->ssl_ca_file;
++		cv[41].destination = &(s->range_requests);
+ 
+-		cv[46].destination = s->ssl_cipher_list;
+-		cv[47].destination = &(s->ssl_use_sslv2);
+-		cv[48].destination = &(s->etag_use_inode);
+-		cv[49].destination = &(s->etag_use_mtime);
+-		cv[50].destination = &(s->etag_use_size);
++		cv[47].destination = s->ssl_cipher_list;
++		cv[48].destination = &(s->ssl_use_sslv2);
++		cv[49].destination = &(s->etag_use_inode);
++		cv[50].destination = &(s->etag_use_mtime);
++		cv[51].destination = &(s->etag_use_size);
+ 
+ 		srv->config_storage[i] = s;
+ 
+@@ -279,6 +282,7 @@
+ 	PATCH(log_request_handling);
+ 	PATCH(log_condition_handling);
+ 	PATCH(log_file_not_found);
++	PATCH(log_ssl_noise);
+ 
+ 	PATCH(range_requests);
+ 	PATCH(force_lowercase_filenames);
+@@ -305,9 +309,6 @@
  		data_config *dc = (data_config *)srv->config_context->data[i];
  		specific_config *s = srv->config_storage[i];
  
@@ -443,7 +826,16 @@
  		/* condition didn't match */
  		if (!config_check_cond(srv, con, dc)) continue;
  
-@@ -410,8 +408,8 @@
+@@ -371,6 +372,8 @@
+ 				PATCH(log_condition_handling);
+ 			} else if (buffer_is_equal_string(du->key, CONST_STR_LEN("debug.log-file-not-found"))) {
+ 				PATCH(log_file_not_found);
++			} else if (buffer_is_equal_string(du->key, CONST_STR_LEN("debug.log-ssl-noise"))) {
++				PATCH(log_ssl_noise);
+ 			} else if (buffer_is_equal_string(du->key, CONST_STR_LEN("server.protocol-http11"))) {
+ 				PATCH(allow_http11);
+ 			} else if (buffer_is_equal_string(du->key, CONST_STR_LEN("server.force-lowercase-filenames"))) {
+@@ -410,8 +413,8 @@
  
  #if 0
  static int tokenizer_open(server *srv, tokenizer_t *t, buffer *basedir, const char *fn) {
@@ -454,7 +846,152 @@
  			(fn[0] == '.' && (fn[1] == '/' || fn[1] == '\\'))) {
  		t->file = buffer_init_string(fn);
  	} else {
-@@ -884,8 +882,8 @@
+@@ -480,7 +483,7 @@
+ 				if (t->input[t->offset + 1] == '>') {
+ 					t->offset += 2;
+ 
+-					buffer_copy_string(token, "=>");
++					buffer_copy_string_len(token, CONST_STR_LEN("=>"));
+ 
+ 					tid = TK_ARRAY_ASSIGN;
+ 				} else {
+@@ -494,13 +497,13 @@
+ 				if (t->input[t->offset + 1] == '=') {
+ 					t->offset += 2;
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/lighttpd-branch.diff?r1=1.38&r2=1.39&f=u



More information about the pld-cvs-commit mailing list