From d9a32ecab5d64cf44d8f6fb5d9bd12a790ed2c14 Mon Sep 17 00:00:00 2001 From: Martin Matuska Date: Sun, 15 Aug 2010 21:48:12 +0000 Subject: - Update to 1.4.27 - Add fdevent kqueue patch from upstream (SVN revision 2764) - Add libev support (optional) - Do not depend on spawn-fcgi by default - Add IPv4 and IPv6 sockets to configuration example --- www/lighttpd/files/patch-src-connections.c | 47 ---------------------- .../files/patch-src-fdevent_freebsd_kqueue.c | 20 +++++++++ www/lighttpd/files/patch-src__network.c | 11 ----- www/lighttpd/files/patch-src_mod_accesslog.c | 13 ------ www/lighttpd/files/patch-src_require.c | 20 --------- 5 files changed, 20 insertions(+), 91 deletions(-) delete mode 100644 www/lighttpd/files/patch-src-connections.c create mode 100644 www/lighttpd/files/patch-src-fdevent_freebsd_kqueue.c delete mode 100644 www/lighttpd/files/patch-src__network.c delete mode 100644 www/lighttpd/files/patch-src_mod_accesslog.c delete mode 100644 www/lighttpd/files/patch-src_require.c (limited to 'www/lighttpd/files') diff --git a/www/lighttpd/files/patch-src-connections.c b/www/lighttpd/files/patch-src-connections.c deleted file mode 100644 index 96cf9698fc7d..000000000000 --- a/www/lighttpd/files/patch-src-connections.c +++ /dev/null @@ -1,47 +0,0 @@ ---- src/connections.c.orig -+++ src/connections.c -@@ -310,6 +310,8 @@ static int connection_handle_read_ssl(server *srv, connection *con) { - /* the other end close the connection -> KEEP-ALIVE */ - - return -2; -+ } else { -+ joblist_append(srv, con); - } - - return 0; -@@ -320,6 +322,7 @@ static int connection_handle_read_ssl(server *srv, connection *con) { - #endif - } - -+/* 0: everything ok, -1: error, -2: con closed */ - static int connection_handle_read(server *srv, connection *con) { - int len; - buffer *b; -@@ -1180,15 +1183,20 @@ static handler_t connection_handle_fdevent(void *s, void *context, int revents) - - joblist_append(srv, con); - -- if (revents & FDEVENT_IN) { -- con->is_readable = 1; --#if 0 -- log_error_write(srv, __FILE__, __LINE__, "sd", "read-wait - done", con->fd); --#endif -- } -- if (revents & FDEVENT_OUT) { -- con->is_writable = 1; -- /* we don't need the event twice */ -+ if (con->conf.is_ssl) { -+ /* ssl may read and write for both reads and writes */ -+ if (revents & (FDEVENT_IN | FDEVENT_OUT)) { -+ con->is_readable = 1; -+ con->is_writable = 1; -+ } -+ } else { -+ if (revents & FDEVENT_IN) { -+ con->is_readable = 1; -+ } -+ if (revents & FDEVENT_OUT) { -+ con->is_writable = 1; -+ /* we don't need the event twice */ -+ } - } diff --git a/www/lighttpd/files/patch-src-fdevent_freebsd_kqueue.c b/www/lighttpd/files/patch-src-fdevent_freebsd_kqueue.c new file mode 100644 index 000000000000..9729c449babb --- /dev/null +++ b/www/lighttpd/files/patch-src-fdevent_freebsd_kqueue.c @@ -0,0 +1,20 @@ +Index: src/fdevent_freebsd_kqueue.c +=================================================================== +--- src/fdevent_freebsd_kqueue.c (revision 2763) ++++ src/fdevent_freebsd_kqueue.c (revision 2764) +@@ -39,12 +39,15 @@ + NULL, 0, + &ts); + ++ /* Ignore errors for now, as we remove for READ and WRITE without knowing what was registered */ ++#if 0 + if (ret == -1) { + log_error_write(ev->srv, __FILE__, __LINE__, "SS", + "kqueue event delete failed: ", strerror(errno)); + + return -1; + } ++#endif + + return -1; + } diff --git a/www/lighttpd/files/patch-src__network.c b/www/lighttpd/files/patch-src__network.c deleted file mode 100644 index 996d8002a9aa..000000000000 --- a/www/lighttpd/files/patch-src__network.c +++ /dev/null @@ -1,11 +0,0 @@ ---- src/network.c 2010-01-28 10:43:33.829209750 -0500 -+++ src/network.c 2010-01-28 10:44:22.639208732 -0500 -@@ -525,7 +525,7 @@ int network_init(server *srv) { - - if (!s->ssl_use_sslv2) { - /* disable SSLv2 */ -- if (SSL_OP_NO_SSLv2 != SSL_CTX_set_options(s->ssl_ctx, SSL_OP_NO_SSLv2)) { -+ if (!(SSL_OP_NO_SSLv2 & SSL_CTX_set_options(s->ssl_ctx, SSL_OP_NO_SSLv2))) { - log_error_write(srv, __FILE__, __LINE__, "ss", "SSL:", - ERR_error_string(ERR_get_error(), NULL)); - return -1; diff --git a/www/lighttpd/files/patch-src_mod_accesslog.c b/www/lighttpd/files/patch-src_mod_accesslog.c deleted file mode 100644 index e873fcfb9022..000000000000 --- a/www/lighttpd/files/patch-src_mod_accesslog.c +++ /dev/null @@ -1,13 +0,0 @@ ---- src/mod_accesslog.c.orig 2009-11-05 12:40:58.000000000 -0200 -+++ src/mod_accesslog.c 2009-11-05 12:41:17.000000000 -0200 -@@ -162,7 +162,9 @@ - if (str->used == 0) return; - buffer_prepare_append(dest, str->used - 1); - -- for (unsigned int i = 0; i < str->used - 1; i++) { -+ unsigned int i; -+ -+ for (i = 0; i < str->used - 1; i++) { - if (str->ptr[i] >= ' ' && str->ptr[i] <= '~') { - /* printable chars */ - buffer_append_string_len(dest, &str->ptr[i], 1); diff --git a/www/lighttpd/files/patch-src_require.c b/www/lighttpd/files/patch-src_require.c deleted file mode 100644 index 7ad810855ba5..000000000000 --- a/www/lighttpd/files/patch-src_require.c +++ /dev/null @@ -1,20 +0,0 @@ ---- src/response.c.orig 2009-11-30 13:49:22.000000000 -0200 -+++ src/response.c 2009-11-30 13:52:28.000000000 -0200 -@@ -136,6 +136,7 @@ - X509 *xs; - X509_NAME *xn; - X509_NAME_ENTRY *xe; -+ int i, nentries; - if ( - SSL_get_verify_result(con->ssl) != X509_V_OK - || !(xs = SSL_get_peer_certificate(con->ssl)) -@@ -144,7 +145,8 @@ - } - - xn = X509_get_subject_name(xs); -- for (int i = 0, nentries = X509_NAME_entry_count(xn); i < nentries; ++i) { -+ nentries = X509_NAME_entry_count(xn); -+ for (i = 0; i < nentries; ++i) { - int xobjnid; - const char * xobjsn; - data_string *envds; -- cgit v1.2.3