Upgrade to lighttpd 1.4.20. Large bug fix update.

Tested by a number of users.
This commit is contained in:
brad 2008-10-23 20:29:17 +00:00
parent 5d5af46a90
commit 1aaf868654
10 changed files with 11 additions and 193 deletions

View File

@ -1,11 +1,10 @@
# $OpenBSD: Makefile,v 1.53 2008/04/25 10:23:07 jasper Exp $
# $OpenBSD: Makefile,v 1.54 2008/10/23 20:29:17 brad Exp $
SHARED_ONLY= Yes
COMMENT= secure, fast, compliant, and very flexible web-server
DISTNAME= lighttpd-1.4.19
PKGNAME= ${DISTNAME}p3
DISTNAME= lighttpd-1.4.20
CATEGORIES= www net
MASTER_SITES= ${HOMEPAGE}/download/

View File

@ -1,5 +1,5 @@
MD5 (lighttpd-1.4.19.tar.gz) = zt5BDnre4+oUIGdJGQqLXQ==
RMD160 (lighttpd-1.4.19.tar.gz) = fb4qIgUeGPQDe0juSBHiyXONIM8=
SHA1 (lighttpd-1.4.19.tar.gz) = eeLWHdkBfDxQwP6YsiicrlwSVe4=
SHA256 (lighttpd-1.4.19.tar.gz) = RFMkuVgR4o7RryPbA2SBNs4zR4HomrhY+0/VcQFvsd8=
SIZE (lighttpd-1.4.19.tar.gz) = 815568
MD5 (lighttpd-1.4.20.tar.gz) = fOfu+0h2grYdmwa0GGTGSg==
RMD160 (lighttpd-1.4.20.tar.gz) = Ii6cabYUZ/k3Z2j5Kl7uOt15YCA=
SHA1 (lighttpd-1.4.20.tar.gz) = YXkMAtnpbDyyP/05B/HK7mTEdd0=
SHA256 (lighttpd-1.4.20.tar.gz) = MqJa0ZNyvVvkUQ2TR5VqywM3D9hs/t3tYfQjtze33bE=
SIZE (lighttpd-1.4.20.tar.gz) = 827538

View File

@ -1,70 +0,0 @@
$OpenBSD: patch-src_connections_c,v 1.6 2008/04/08 19:11:40 jasper Exp $
--- src/connections.c.orig Wed Feb 27 18:41:35 2008
+++ src/connections.c Mon Apr 7 21:39:42 2008
@@ -199,6 +199,7 @@ static int connection_handle_read_ssl(server *srv, con
/* don't resize the buffer if we were in SSL_ERROR_WANT_* */
+ ERR_clear_error();
do {
if (!con->ssl_error_want_reuse_buffer) {
b = buffer_init();
@@ -1668,21 +1669,51 @@ int connection_state_machine(server *srv, connection *
}
#ifdef USE_OPENSSL
if (srv_sock->is_ssl) {
- int ret;
+ int ret, ssl_r;
+ unsigned long err;
+ ERR_clear_error();
switch ((ret = SSL_shutdown(con->ssl))) {
case 1:
/* ok */
break;
case 0:
- SSL_shutdown(con->ssl);
- break;
+ ERR_clear_error();
+ if (-1 != (ret = SSL_shutdown(con->ssl))) break;
+
+ /* fall through */
default:
- log_error_write(srv, __FILE__, __LINE__, "sds", "SSL:",
- SSL_get_error(con->ssl, ret),
- ERR_error_string(ERR_get_error(), NULL));
- return -1;
+
+ switch ((ssl_r = SSL_get_error(con->ssl, ret))) {
+ case SSL_ERROR_WANT_WRITE:
+ case SSL_ERROR_WANT_READ:
+ break;
+ case SSL_ERROR_SYSCALL:
+ /* perhaps we have error waiting in our error-queue */
+ if (0 != (err = ERR_get_error())) {
+ do {
+ log_error_write(srv, __FILE__, __LINE__, "sdds", "SSL:",
+ ssl_r, ret,
+ ERR_error_string(err, NULL));
+ } while((err = ERR_get_error()));
+ } else {
+ log_error_write(srv, __FILE__, __LINE__, "sddds", "SSL (error):",
+ ssl_r, ret, errno,
+ strerror(errno));
+ }
+
+ break;
+ default:
+ while((err = ERR_get_error())) {
+ log_error_write(srv, __FILE__, __LINE__, "sdds", "SSL:",
+ ssl_r, ret,
+ ERR_error_string(err, NULL));
+ }
+
+ break;
+ }
}
}
+ ERR_clear_error();
#endif
switch(con->mode) {

View File

@ -1,34 +0,0 @@
$OpenBSD: patch-src_mod_cgi_c,v 1.1 2008/04/25 10:23:07 jasper Exp $
--- src/mod_cgi.c.orig Thu Apr 24 01:17:35 2008
+++ src/mod_cgi.c Thu Apr 24 01:19:08 2008
@@ -1058,8 +1058,9 @@ static int cgi_create_env(server *srv, connection *con
switch(errno) {
case ENOSPC:
con->http_status = 507;
-
break;
+ case EINTR:
+ continue;
default:
con->http_status = 403;
break;
@@ -1071,8 +1072,9 @@ static int cgi_create_env(server *srv, connection *con
switch(errno) {
case ENOSPC:
con->http_status = 507;
-
break;
+ case EINTR:
+ continue;
default:
con->http_status = 403;
break;
@@ -1087,6 +1089,8 @@ static int cgi_create_env(server *srv, connection *con
c->offset += r;
cq->bytes_out += r;
} else {
+ log_error_write(srv, __FILE__, __LINE__, "ss", "write() failed due to: ", strerror(errno));
+ con->http_status = 500;
break;
}
chunkqueue_remove_finished_chunks(cq);

View File

@ -1,14 +0,0 @@
$OpenBSD: patch-src_mod_compress_c,v 1.1 2008/03/16 18:43:31 brad Exp $
--- src/mod_compress.c.orig Sun Mar 16 09:14:55 2008
+++ src/mod_compress.c Sun Mar 16 09:15:28 2008
@@ -178,9 +178,9 @@ SETDEFAULTS_FUNC(mod_compress_setdefaults) {
}
if (!buffer_is_empty(s->compress_cache_dir)) {
+ struct stat st;
mkdir_recursive(s->compress_cache_dir->ptr);
- struct stat st;
if (0 != stat(s->compress_cache_dir->ptr, &st)) {
log_error_write(srv, __FILE__, __LINE__, "sbs", "can't stat compress.cache-dir",
s->compress_cache_dir, strerror(errno));

View File

@ -1,14 +0,0 @@
$OpenBSD: patch-src_mod_extforward_c,v 1.1 2008/03/16 18:43:31 brad Exp $
--- src/mod_extforward.c.orig Sun Mar 16 09:16:32 2008
+++ src/mod_extforward.c Sun Mar 16 09:17:07 2008
@@ -281,8 +281,9 @@ static int is_proxy_trusted(const char *ipstr, plugin_
static const char *last_not_in_array(array *a, plugin_data *p)
{
array *forwarder = p->conf.forwarder;
+ int i;
- for (int i = a->used - 1; i >= 0; i--) {
+ for (i = a->used - 1; i >= 0; i--) {
data_string *ds = (data_string *)a->data[i];
const char *ip = ds->value->ptr;

View File

@ -1,18 +0,0 @@
$OpenBSD: patch-src_mod_magnet_c,v 1.1 2008/04/25 10:23:07 jasper Exp $
--- src/mod_magnet.c.orig Thu Apr 24 01:16:35 2008
+++ src/mod_magnet.c Thu Apr 24 01:17:24 2008
@@ -761,11 +761,13 @@ static handler_t magnet_attract(server *srv, connectio
if (lua_return_value > 99) {
con->http_status = lua_return_value;
- con->file_finished = 1;
/* try { ...*/
if (0 == setjmp(exceptionjmp)) {
magnet_attach_content(srv, con, p, L);
+ if (!chunkqueue_is_empty(con->write_queue)) {
+ con->mode = p->id;
+ }
} else {
/* } catch () { */
con->http_status = 500;

View File

@ -1,19 +0,0 @@
$OpenBSD: patch-src_network_openssl_c,v 1.1 2008/04/03 10:18:15 jasper Exp $
--- src/network_openssl.c.orig Wed Apr 2 19:20:16 2008
+++ src/network_openssl.c Wed Apr 2 19:21:18 2008
@@ -85,6 +85,7 @@ int network_write_chunkqueue_openssl(server *srv, conn
*
*/
+ ERR_clear_error();
if ((r = SSL_write(ssl, offset, toSend)) <= 0) {
unsigned long err;
@@ -187,6 +188,7 @@ int network_write_chunkqueue_openssl(server *srv, conn
close(ifd);
+ ERR_clear_error();
if ((r = SSL_write(ssl, s, toSend)) <= 0) {
unsigned long err;

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-src_response_c,v 1.1 2008/04/16 20:42:35 jasper Exp $
--- src/response.c.orig Fri Apr 11 19:36:38 2008
+++ src/response.c Fri Apr 11 19:37:12 2008
@@ -101,7 +101,7 @@ int http_response_write_header(server *srv, connection
if (!have_server) {
if (buffer_is_empty(con->conf.server_tag)) {
BUFFER_APPEND_STRING_CONST(b, "\r\nServer: " PACKAGE_NAME "/" PACKAGE_VERSION);
- } else {
+ } else if (con->conf.server_tag->used > 1) {
BUFFER_APPEND_STRING_CONST(b, "\r\nServer: ");
buffer_append_string_encoded(b, CONST_BUF_LEN(con->conf.server_tag), ENCODING_HTTP_HEADER);
}

View File

@ -1,7 +1,7 @@
@comment $OpenBSD: PLIST,v 1.18 2008/04/16 20:42:35 jasper Exp $
@comment $OpenBSD: PLIST,v 1.19 2008/10/23 20:29:17 brad Exp $
@newgroup _lighttpd:585
@newuser _lighttpd:585:_lighttpd:daemon:lighttpd Account:/nonexistent:/sbin/nologin
bin/spawn-fcgi
@bin bin/spawn-fcgi
lib/lighttpd/
@comment lib/lighttpd/mod_access.la
lib/lighttpd/mod_access.so
@ -68,8 +68,8 @@ lib/lighttpd/mod_webdav.so
%%mysql%%
@man man/man1/lighttpd.1
@man man/man1/spawn-fcgi.1
sbin/lighttpd
sbin/lighttpd-angel
@bin sbin/lighttpd
@bin sbin/lighttpd-angel
share/doc/lighttpd/
share/doc/lighttpd/access.txt
share/doc/lighttpd/accesslog.txt