SOURCES: lighttpd-branch.diff - up to r2118

glen glen at pld-linux.org
Thu Mar 6 11:35:09 CET 2008


Author: glen                         Date: Thu Mar  6 10:35:09 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- up to r2118

---- Files affected:
SOURCES:
   lighttpd-branch.diff (1.30 -> 1.31) 

---- Diffs:

================================================================
Index: SOURCES/lighttpd-branch.diff
diff -u SOURCES/lighttpd-branch.diff:1.30 SOURCES/lighttpd-branch.diff:1.31
--- SOURCES/lighttpd-branch.diff:1.30	Mon Jan 21 09:24:44 2008
+++ SOURCES/lighttpd-branch.diff	Thu Mar  6 11:35:03 2008
@@ -2,9 +2,18 @@
 ===================================================================
 Index: src/configfile-glue.c
 ===================================================================
---- src/configfile-glue.c	(.../tags/lighttpd-1.4.18)	(revision 2061)
-+++ src/configfile-glue.c	(.../branches/lighttpd-1.4.x)	(revision 2061)
-@@ -341,6 +341,10 @@
+--- src/configfile-glue.c	(.../tags/lighttpd-1.4.18)	(revision 2118)
++++ src/configfile-glue.c	(.../branches/lighttpd-1.4.x)	(revision 2118)
+@@ -277,7 +277,7 @@
+ 		}
+ 		break;
+ 	}
+-	case COMP_HTTP_REMOTEIP: {
++	case COMP_HTTP_REMOTE_IP: {
+ 		char *nm_slash;
+ 		/* handle remoteip limitations
+ 		 *
+@@ -341,11 +341,15 @@
  		}
  		break;
  	}
@@ -15,10 +24,85 @@
  	case COMP_HTTP_URL:
  		l = con->uri.path;
  		break;
+ 
+-	case COMP_HTTP_QUERYSTRING:
++	case COMP_HTTP_QUERY_STRING:
+ 		l = con->uri.query;
+ 		break;
+ 
+@@ -372,7 +376,7 @@
+ 		}
+ 		break;
+ 	}
+-	case COMP_HTTP_USERAGENT: {
++	case COMP_HTTP_USER_AGENT: {
+ 		data_string *ds;
+ 		if (NULL != (ds = (data_string *)array_get_element(con->request.headers, "User-Agent"))) {
+ 			l = ds->value;
+@@ -381,7 +385,17 @@
+ 		}
+ 		break;
+ 	}
++	case COMP_HTTP_REQUEST_METHOD: {
++		const char *method = get_http_method_name(con->request.http_method);
+ 
++		/* we only have the request method as const char but we need a buffer for comparing */
++
++		buffer_copy_string(srv->tmp_buf, method);
++
++		l = srv->tmp_buf;
++
++		break;
++	}
+ 	default:
+ 		return COND_RESULT_FALSE;
+ 	}
+Index: src/mod_cgi.c
+===================================================================
+--- src/mod_cgi.c	(.../tags/lighttpd-1.4.18)	(revision 2118)
++++ src/mod_cgi.c	(.../branches/lighttpd-1.4.x)	(revision 2118)
+@@ -1004,6 +1004,7 @@
+ 	case -1:
+ 		/* error */
+ 		log_error_write(srv, __FILE__, __LINE__, "ss", "fork failed:", strerror(errno));
++		return -1;
+ 		break;
+ 	default: {
+ 		handler_ctx *hctx;
+@@ -1227,8 +1228,14 @@
+ #if 0
+ 				log_error_write(srv, __FILE__, __LINE__, "sd", "(debug) cgi exited fine, pid:", p->cgi_pid.ptr[ndx]);
+ #endif
++			} else if (WIFSIGNALED(status)) {
++				/* FIXME: what if we killed the CGI script with a kill(..., SIGTERM) ?
++				 */
++				if (WTERMSIG(status) != SIGTERM) {
++					log_error_write(srv, __FILE__, __LINE__, "sd", "cleaning up CGI: process died with signal", WTERMSIG(status));
++				}
+ 			} else {
+-				log_error_write(srv, __FILE__, __LINE__, "s", "cgi died ?");
++				log_error_write(srv, __FILE__, __LINE__, "s", "cleaning up CGI: ended unexpectedly");
+ 			}
+ 
+ 			cgi_pid_del(srv, p, p->cgi_pid.ptr[ndx]);
+Index: src/mod_secure_download.c
+===================================================================
+--- src/mod_secure_download.c	(.../tags/lighttpd-1.4.18)	(revision 2118)
++++ src/mod_secure_download.c	(.../branches/lighttpd-1.4.x)	(revision 2118)
+@@ -245,7 +245,8 @@
+ 	/* timed-out */
+ 	if (srv->cur_ts - ts > p->conf.timeout ||
+ 	    srv->cur_ts - ts < -p->conf.timeout) {
+-		con->http_status = 408;
++		/* "Gone" as the url will never be valid again instead of "408 - Timeout" where the request may be repeated */
++		con->http_status = 410;
+ 
+ 		return HANDLER_FINISHED;
+ 	}
 Index: src/base.h
 ===================================================================
---- src/base.h	(.../tags/lighttpd-1.4.18)	(revision 2061)
-+++ src/base.h	(.../branches/lighttpd-1.4.x)	(revision 2061)
+--- src/base.h	(.../tags/lighttpd-1.4.18)	(revision 2118)
++++ src/base.h	(.../branches/lighttpd-1.4.x)	(revision 2118)
 @@ -515,6 +515,7 @@
  #ifdef USE_OPENSSL
  	SSL_CTX *ssl_ctx;
@@ -27,23 +111,142 @@
  } server_socket;
  
  typedef struct {
+Index: src/connections.c
+===================================================================
+--- src/connections.c	(.../tags/lighttpd-1.4.18)	(revision 2118)
++++ src/connections.c	(.../branches/lighttpd-1.4.x)	(revision 2118)
+@@ -394,10 +394,13 @@
+ 			 * 403 is from the response handler when noone else catched it
+ 			 *
+ 			 * */
+-			if (con->uri.path->used &&
++			if ((!con->http_status || con->http_status == 200) && con->uri.path->used &&
+ 			    con->uri.path->ptr[0] != '*') {
+ 				response_header_insert(srv, con, CONST_STR_LEN("Allow"), CONST_STR_LEN("OPTIONS, GET, HEAD, POST"));
+ 
++				con->response.transfer_encoding &= ~HTTP_TRANSFER_ENCODING_CHUNKED;
++				con->parsed_response &= ~HTTP_CONTENT_LENGTH;
++
+ 				con->http_status = 200;
+ 				con->file_finished = 1;
+ 
+@@ -498,9 +501,11 @@
+ 	case 207:
+ 	case 200: /* class: header + body */
+ 	case 201:
++	case 300:
+ 	case 301:
+ 	case 302:
+ 	case 303:
++	case 307:
+ 		break;
+ 
+ 	case 206: /* write_queue is already prepared */
+@@ -511,13 +516,13 @@
+ 	default:
+ 		/* disable chunked encoding again as we have no body */
+ 		con->response.transfer_encoding &= ~HTTP_TRANSFER_ENCODING_CHUNKED;
++		con->parsed_response &= ~HTTP_CONTENT_LENGTH;
+ 		chunkqueue_reset(con->write_queue);
+ 
+ 		con->file_finished = 1;
+ 		break;
+ 	}
+ 
+-
+ 	if (con->file_finished) {
+ 		/* we have all the content and chunked encoding is not used, set a content-length */
+ 
+@@ -536,12 +541,16 @@
+ 			if ((con->http_status >= 100 && con->http_status < 200) ||
+ 			    con->http_status == 204 ||
+ 			    con->http_status == 304) {
++				data_string *ds;
+ 				/* no Content-Body, no Content-Length */
+-			} else if (qlen >= 0) {
++				if (NULL != (ds = (data_string*) array_get_element(con->response.headers, "Content-Length"))) {
++					buffer_reset(ds->value); // Headers with empty values are ignored for output
++				}
++			} else if (qlen > 0 || con->request.http_method != HTTP_METHOD_HEAD) {
+ 				/* qlen = 0 is important for Redirects (301, ...) as they MAY have
+ 				 * a content. Browsers are waiting for a Content otherwise
+ 				 */
+-				buffer_copy_off_t(srv->tmp_buf, chunkqueue_length(con->write_queue));
++				buffer_copy_off_t(srv->tmp_buf, qlen);
+ 
+ 				response_header_overwrite(srv, con, CONST_STR_LEN("Content-Length"), CONST_BUF_LEN(srv->tmp_buf));
+ 			}
+@@ -582,6 +591,8 @@
+ 		 * a HEAD request has the same as a GET 
+ 		 * without the content
+ 		 */
++		con->file_finished = 1;
++
+ 		chunkqueue_reset(con->write_queue);
+ 		con->response.transfer_encoding &= ~HTTP_TRANSFER_ENCODING_CHUNKED;
+ 	}
+@@ -834,14 +845,8 @@
+ 		con->plugin_ctx[pd->id] = NULL;
+ 	}
+ 
+-#if COND_RESULT_UNSET
+-	for (i = srv->config_context->used - 1; i >= 0; i --) {
+-		con->cond_cache[i].result = COND_RESULT_UNSET;
+-		con->cond_cache[i].patterncount = 0;
+-	}
+-#else
+-	memset(con->cond_cache, 0, sizeof(cond_cache_t) * srv->config_context->used);
+-#endif
++	/* The cond_cache gets reset in response.c */
++//	config_cond_cache_reset(srv, con);
+ 
+ #ifdef USE_OPENSSL
+ 	if (con->ssl_error_want_reuse_buffer) {
 Index: src/array.h
 ===================================================================
---- src/array.h	(.../tags/lighttpd-1.4.18)	(revision 2061)
-+++ src/array.h	(.../branches/lighttpd-1.4.x)	(revision 2061)
-@@ -90,6 +90,7 @@
+--- src/array.h	(.../tags/lighttpd-1.4.18)	(revision 2118)
++++ src/array.h	(.../branches/lighttpd-1.4.x)	(revision 2118)
+@@ -86,10 +86,12 @@
+ 	COMP_HTTP_URL,
+ 	COMP_HTTP_HOST,
+ 	COMP_HTTP_REFERER,
+-	COMP_HTTP_USERAGENT,
++	COMP_HTTP_USER_AGENT,
  	COMP_HTTP_COOKIE,
- 	COMP_HTTP_REMOTEIP,
- 	COMP_HTTP_QUERYSTRING,
+-	COMP_HTTP_REMOTEIP,
+-	COMP_HTTP_QUERYSTRING,
++	COMP_HTTP_REMOTE_IP,
++	COMP_HTTP_QUERY_STRING,
 +	COMP_HTTP_SCHEME,
++	COMP_HTTP_REQUEST_METHOD,
  
  	COMP_LAST_ELEMENT
  } comp_key_t;
 Index: src/mod_staticfile.c
 ===================================================================
---- src/mod_staticfile.c	(.../tags/lighttpd-1.4.18)	(revision 2061)
-+++ src/mod_staticfile.c	(.../branches/lighttpd-1.4.x)	(revision 2061)
-@@ -483,8 +483,24 @@
+--- src/mod_staticfile.c	(.../tags/lighttpd-1.4.18)	(revision 2118)
++++ src/mod_staticfile.c	(.../branches/lighttpd-1.4.x)	(revision 2118)
+@@ -352,7 +352,7 @@
+ 	size_t k;
+ 	int s_len;
+ 	stat_cache_entry *sce = NULL;
+-	buffer *mtime;
++	buffer *mtime = NULL;
+ 	data_string *ds;
+ 	int allow_caching = 1;
+ 
+@@ -450,7 +450,9 @@
+ 		}
+ 	}
+ 
+-	response_header_overwrite(srv, con, CONST_STR_LEN("Accept-Ranges"), CONST_STR_LEN("bytes"));
++	if (con->conf.range_requests) {
++		response_header_overwrite(srv, con, CONST_STR_LEN("Accept-Ranges"), CONST_STR_LEN("bytes"));
++	}
+ 
+ 	if (allow_caching) {
+ 		if (p->conf.etags_used && con->etag_flags != 0 && !buffer_is_empty(sce->etag)) {
+@@ -483,8 +485,24 @@
  			/* if the value is the same as our ETag, we do a Range-request,
  			 * otherwise a full 200 */
  
@@ -69,11 +272,53 @@
  			}
  		}
  
+Index: src/fdevent_solaris_devpoll.c
+===================================================================
+--- src/fdevent_solaris_devpoll.c	(.../tags/lighttpd-1.4.18)	(revision 2118)
++++ src/fdevent_solaris_devpoll.c	(.../branches/lighttpd-1.4.x)	(revision 2118)
+@@ -67,7 +67,7 @@
+ 	int ret;
+ 
+ 	dopoll.dp_timeout = timeout_ms;
+-	dopoll.dp_nfds = ev->maxfds;
++	dopoll.dp_nfds = ev->maxfds - 1;
+ 	dopoll.dp_fds = ev->devpollfds;
+ 
+ 	ret = ioctl(ev->devpoll_fd, DP_POLL, &dopoll);
+Index: src/etag.c
+===================================================================
+--- src/etag.c	(.../tags/lighttpd-1.4.18)	(revision 2118)
++++ src/etag.c	(.../branches/lighttpd-1.4.x)	(revision 2118)
+@@ -1,5 +1,14 @@
+ #include <string.h>
++
++#ifdef HAVE_CONFIG_H
++#include "config.h"
++#endif
++
++#if defined HAVE_STDINT_H
+ #include <stdint.h>
++#elif defined HAVE_INTTYPES_H
++#include <inttypes.h>
++#endif
+ 
+ #include "buffer.h"
+ #include "etag.h"
 Index: src/mod_scgi.c
 ===================================================================
---- src/mod_scgi.c	(.../tags/lighttpd-1.4.18)	(revision 2061)
-+++ src/mod_scgi.c	(.../branches/lighttpd-1.4.x)	(revision 2061)
-@@ -2694,8 +2694,9 @@
+--- src/mod_scgi.c	(.../tags/lighttpd-1.4.18)	(revision 2118)
++++ src/mod_scgi.c	(.../branches/lighttpd-1.4.x)	(revision 2118)
+@@ -1057,6 +1057,9 @@
+ 						/* a local socket + self spawning */
+ 						size_t pno;
+ 
++						/* HACK:  just to make sure the adaptive spawing is disabled */
++						df->min_procs = df->max_procs;
++
+ 						if (df->min_procs > df->max_procs) df->max_procs = df->min_procs;
+ 						if (df->max_load_per_proc < 1) df->max_load_per_proc = 0;
+ 
+@@ -2694,8 +2697,9 @@
  		if (s_len < ct_len) continue;
  
  		/* check extension in the form "/scgi_pattern" */
@@ -87,9 +332,17 @@
  			break;
 Index: src/response.c
 ===================================================================
---- src/response.c	(.../tags/lighttpd-1.4.18)	(revision 2061)
-+++ src/response.c	(.../branches/lighttpd-1.4.x)	(revision 2061)
-@@ -59,7 +59,8 @@
+--- src/response.c	(.../tags/lighttpd-1.4.18)	(revision 2118)
++++ src/response.c	(.../branches/lighttpd-1.4.x)	(revision 2118)
+@@ -19,6 +19,7 @@
+ #include "stat_cache.h"
+ #include "chunk.h"
+ 
++#include "configfile.h"
+ #include "connections.h"
+ 
+ #include "plugin.h"
+@@ -59,7 +60,8 @@
  		ds = (data_string *)con->response.headers->data[i];
  
  		if (ds->value->used && ds->key->used &&
@@ -99,18 +352,103 @@
  			if (buffer_is_equal_string(ds->key, CONST_STR_LEN("Date"))) have_date = 1;
  			if (buffer_is_equal_string(ds->key, CONST_STR_LEN("Server"))) have_server = 1;
  
-@@ -180,6 +181,7 @@
+@@ -149,6 +151,9 @@
+ 		 *
+ 		 *  */
+ 
++		config_cond_cache_reset(srv, con);
++		config_setup_connection(srv, con); // Perhaps this could be removed at other places.
++
+ 		if (con->conf.log_condition_handling) {
+ 			log_error_write(srv, __FILE__, __LINE__,  "s",  "run condition");
+ 		}
+@@ -180,11 +185,13 @@
  		buffer_copy_string_buffer(con->uri.authority, con->request.http_host);
  		buffer_to_lower(con->uri.authority);
  
 +		config_patch_connection(srv, con, COMP_HTTP_SCHEME);    /* Scheme:      */
  		config_patch_connection(srv, con, COMP_HTTP_HOST);      /* Host:        */
- 		config_patch_connection(srv, con, COMP_HTTP_REMOTEIP);  /* Client-IP */
+-		config_patch_connection(srv, con, COMP_HTTP_REMOTEIP);  /* Client-IP */
++		config_patch_connection(srv, con, COMP_HTTP_REMOTE_IP); /* Client-IP */
  		config_patch_connection(srv, con, COMP_HTTP_REFERER);   /* Referer:     */
+-		config_patch_connection(srv, con, COMP_HTTP_USERAGENT); /* User-Agent:  */
++		config_patch_connection(srv, con, COMP_HTTP_USER_AGENT);/* User-Agent:  */
+ 		config_patch_connection(srv, con, COMP_HTTP_COOKIE);    /* Cookie:  */
++		config_patch_connection(srv, con, COMP_HTTP_REQUEST_METHOD); /* REQUEST_METHOD */
+ 
+ 		/** their might be a fragment which has to be cut away */
+ 		if (NULL != (qstr = strchr(con->request.uri->ptr, '#'))) {
+@@ -270,7 +277,7 @@
+ 		 */
+ 
+ 		config_patch_connection(srv, con, COMP_HTTP_URL); /* HTTPurl */
+-		config_patch_connection(srv, con, COMP_HTTP_QUERYSTRING); /* HTTPqs */
++		config_patch_connection(srv, con, COMP_HTTP_QUERY_STRING); /* HTTPqs */
+ 
+ 		/* do we have to downgrade to 1.0 ? */
+ 		if (!con->conf.allow_http11) {
+@@ -547,17 +554,14 @@
+ 			buffer_copy_string_buffer(srv->tmp_buf, con->physical.path);
+ 
+ 			do {
+-				struct stat st;
+-
+ 				if (slash) {
+ 					buffer_copy_string_len(con->physical.path, srv->tmp_buf->ptr, slash - srv->tmp_buf->ptr);
+ 				} else {
+ 					buffer_copy_string_buffer(con->physical.path, srv->tmp_buf);
+ 				}
+ 
+-				if (0 == stat(con->physical.path->ptr, &(st)) &&
+-				    S_ISREG(st.st_mode)) {
+-					found = 1;
++				if (HANDLER_ERROR != stat_cache_get_entry(srv, con, con->physical.path, &sce)) {
++					found = S_ISREG(sce->st.st_mode);
+ 					break;
+ 				}
+ 
+@@ -589,6 +593,20 @@
+ 				return HANDLER_FINISHED;
+ 			}
+ 
++#ifdef HAVE_LSTAT
++			if ((sce->is_symlink != 0) && !con->conf.follow_symlink) {
++				con->http_status = 403;
++
++				if (con->conf.log_request_handling) {
++					log_error_write(srv, __FILE__, __LINE__,  "s",  "-- access denied due symlink restriction");
++					log_error_write(srv, __FILE__, __LINE__,  "sb", "Path         :", con->physical.path);
++				}
++
++				buffer_reset(con->physical.path);
++				return HANDLER_FINISHED;
++			};
++#endif
++
+ 			/* we have a PATHINFO */
+ 			if (pathinfo) {
+ 				buffer_copy_string(con->request.pathinfo, pathinfo);
+@@ -631,8 +649,14 @@
+ 
+ 		/* if we are still here, no one wanted the file, status 403 is ok I think */
+ 
+-		if (con->mode == DIRECT) {
+-			con->http_status = 403;
++		if (con->mode == DIRECT && con->http_status == 0) {
++			switch (con->request.http_method) {
++			case HTTP_METHOD_OPTIONS:
++				con->http_status = 200;
++				break;
++			default:
++				con->http_status = 403;
++			}
+ 
+ 			return HANDLER_FINISHED;
+ 		}
 Index: src/mod_userdir.c
 ===================================================================
---- src/mod_userdir.c	(.../tags/lighttpd-1.4.18)	(revision 2061)
-+++ src/mod_userdir.c	(.../branches/lighttpd-1.4.x)	(revision 2061)
+--- src/mod_userdir.c	(.../tags/lighttpd-1.4.18)	(revision 2118)
++++ src/mod_userdir.c	(.../branches/lighttpd-1.4.x)	(revision 2118)
 @@ -21,6 +21,7 @@
  	array *include_user;
  	buffer *path;
@@ -171,8 +509,8 @@
  	BUFFER_APPEND_SLASH(p->temp_path);
 Index: src/mod_proxy.c
 ===================================================================
---- src/mod_proxy.c	(.../tags/lighttpd-1.4.18)	(revision 2061)
-+++ src/mod_proxy.c	(.../branches/lighttpd-1.4.x)	(revision 2061)
+--- src/mod_proxy.c	(.../tags/lighttpd-1.4.18)	(revision 2118)
++++ src/mod_proxy.c	(.../branches/lighttpd-1.4.x)	(revision 2118)
 @@ -1093,15 +1093,17 @@
  		if (s_len < ct_len) continue;
  
@@ -197,10 +535,19 @@
  		} else if (0 == strncmp(fn->ptr + s_len - ct_len, extension->key->ptr, ct_len)) {
  			/* check extension in the form ".fcg" */
  			break;
+@@ -1203,7 +1205,7 @@
+ 		}
+ 
+ 		/* didn't found a higher id, wrap to the start */
+-		if (ndx != -1 && max_usage != INT_MAX) {
++		if (ndx == -1 && max_usage != INT_MAX) {
+ 			ndx = max_usage;
+ 		}
+ 
 Index: src/mod_extforward.c
 ===================================================================
---- src/mod_extforward.c	(.../tags/lighttpd-1.4.18)	(revision 2061)
-+++ src/mod_extforward.c	(.../branches/lighttpd-1.4.x)	(revision 2061)
+--- src/mod_extforward.c	(.../tags/lighttpd-1.4.18)	(revision 2118)
++++ src/mod_extforward.c	(.../branches/lighttpd-1.4.x)	(revision 2118)
 @@ -20,6 +20,7 @@
  /**
   * mod_extforward.c for lighttpd, by comman.kang <at> gmail <dot> com
@@ -304,6 +651,15 @@
  struct addrinfo *ipstr_to_sockaddr(const char *host)
  {
     struct addrinfo hints, *res0;
+@@ -305,7 +329,7 @@
+ 
+ 
+ static void clean_cond_cache(server *srv, connection *con) {
+-	config_cond_cache_reset_item(srv, con, COMP_HTTP_REMOTEIP);
++	config_cond_cache_reset_item(srv, con, COMP_HTTP_REMOTE_IP);
+ }
+ 
+ URIHANDLER_FUNC(mod_extforward_uri_handler) {
 @@ -316,9 +340,8 @@
  	struct addrinfo *addrlist = NULL;
  #endif
@@ -400,30 +756,224 @@
  	return HANDLER_GO_ON;
 Index: src/Makefile.am
 ===================================================================
---- src/Makefile.am	(.../tags/lighttpd-1.4.18)	(revision 2061)
-+++ src/Makefile.am	(.../branches/lighttpd-1.4.x)	(revision 2061)
+--- src/Makefile.am	(.../tags/lighttpd-1.4.18)	(revision 2118)
++++ src/Makefile.am	(.../branches/lighttpd-1.4.x)	(revision 2118)
+@@ -16,20 +16,20 @@
+ configparser.c configparser.h:
+ mod_ssi_exprparser.c mod_ssi_exprparser.h:
+ else
+-configparser.y: lemon
+-mod_ssi_exprparser.y: lemon
++$(srcdir)/configparser.y: lemon
++$(srcdir)/mod_ssi_exprparser.y: lemon
+ 
+-configparser.c configparser.h: configparser.y
++configparser.c configparser.h: $(srcdir)/configparser.y
+ 	rm -f configparser.h
+ 	$(LEMON) -q $(srcdir)/configparser.y $(srcdir)/lempar.c
+ 
+-mod_ssi_exprparser.c mod_ssi_exprparser.h: mod_ssi_exprparser.y
++mod_ssi_exprparser.c mod_ssi_exprparser.h: $(srcdir)/mod_ssi_exprparser.y
+ 	rm -f mod_ssi_exprparser.h
+ 	$(LEMON) -q $(srcdir)/mod_ssi_exprparser.y $(srcdir)/lempar.c
+ endif
+ 
+-configfile.c: configparser.h
+-mod_ssi_expr.c: mod_ssi_exprparser.h
++$(srcdir)/configfile.c: configparser.h
++$(srcdir)/mod_ssi_expr.c: mod_ssi_exprparser.h
+ 
+ common_src=buffer.c log.c \
+       keyvalue.c chunk.c  \
 @@ -281,4 +281,4 @@
  #ajp_SOURCES = ajp.c
  
  noinst_HEADERS   = $(hdr)
 -EXTRA_DIST = mod_skeleton.c configparser.y mod_ssi_exprparser.y lempar.c
 +EXTRA_DIST = mod_skeleton.c configparser.y mod_ssi_exprparser.y lempar.c SConscript
+Index: src/network_openssl.c
+===================================================================
+--- src/network_openssl.c	(.../tags/lighttpd-1.4.18)	(revision 2118)
++++ src/network_openssl.c	(.../branches/lighttpd-1.4.x)	(revision 2118)
+@@ -58,31 +58,6 @@
+ 		SSL_set_shutdown(ssl, SSL_RECEIVED_SHUTDOWN);
+ 	}
+ 
+-	/* evil hack for opera 9.01 and 8.54 and earlier
+-	 *
+-	 * opera hangs if the trainling 0\r\n\r\n is in a seperate SSL-packet
+-	 *
+-	 * we try to move the packet into the previous mem-chunk if possible
+-	 */
+-	if ((cq == con->write_queue) &&
+-	    (con->response.transfer_encoding & HTTP_TRANSFER_ENCODING_CHUNKED) &&
+-	    (con->file_finished)) {
+-		/* merge the last chunk into the previous chunk */
+-
+-		for(c = cq->first; c && c->next && c->next->next; c = c->next);
+-
+-		if (c &&
+-		    c->type == MEM_CHUNK &&
+-		    c->next &&
+-		    c->next->type == MEM_CHUNK &&
+-		    c->next->mem->used == sizeof("0\r\n\r\n") &&
+-		    0 == strcmp(c->next->mem->ptr, "0\r\n\r\n")) {
+-			buffer_append_string_buffer(c->mem, c->next->mem);
+-
+-			c->next->mem->used = 0;
+-		}
+-	}
+-
+ 	for(c = cq->first; c; c = c->next) {
+ 		int chunk_finished = 0;
+ 
+@@ -128,6 +103,7 @@
+ 						/* no, but we have errno */
+ 						switch(errno) {
+ 						case EPIPE:
++						case ECONNRESET:
+ 							return -2;
+ 						default:
+ 							log_error_write(srv, __FILE__, __LINE__, "sddds", "SSL:",
+@@ -230,6 +206,7 @@
+ 							/* no, but we have errno */
+ 							switch(errno) {
+ 							case EPIPE:
++							case ECONNRESET:
+ 								return -2;
+ 							default:
+ 								log_error_write(srv, __FILE__, __LINE__, "sddds", "SSL:",
+Index: src/http_auth.c
+===================================================================
+--- src/http_auth.c	(.../tags/lighttpd-1.4.18)	(revision 2118)
<<Diff was trimmed, longer than 597 lines>>

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



More information about the pld-cvs-commit mailing list