Hello community, here is the log from the commit of package lighttpd for openSUSE:Factory checked in at 2012-06-10 20:17:39 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/lighttpd (Old) and /work/SRC/openSUSE:Factory/.lighttpd.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "lighttpd", Maintainer is "mrueck...@suse.com" Changes: -------- --- /work/SRC/openSUSE:Factory/lighttpd/lighttpd.changes 2012-03-29 14:02:45.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.lighttpd.new/lighttpd.changes 2012-06-10 21:51:40.000000000 +0200 @@ -1,0 +2,35 @@ +Thu Jun 7 15:44:35 UTC 2012 - pgaj...@suse.com + +- fixed build (automake) + * automake.patch + +------------------------------------------------------------------- +Thu May 31 15:51:51 UTC 2012 - mrueck...@suse.de + +- update to 1.4.31 + - [ssl] fix segfault in counting renegotiations for openssl + versions without TLSEXT/SNI (thx carpii for reporting) + - Move fdevent subsystem includes to implementation files to + reduce conflicts (fixes #2373) + - [mod_compress] fix handling if etags are disabled but cache-dir + is set - may lead to double response + - disable mmap by default (fixes #2391) + - buffer_caseless_compare: always convert letters to lowercase to + get transitive results, fixing array lookups (fixes #2405) + - Fix handling of empty header list entries in + http_request_split_value, fixing invalid read in valgrind + (fixes #2413) + - Fix access log escaping of " and \\ (fixes #1551) + - [mod_auth] Fix digest "md5-sess" implementation (Errata ID + 1649, RFC 2617) (fixes #2410) + - [auth] Add "AUTH_TYPE" environment (for *cgi), remove fastcgi + specific workaround, add fastcgi test case (fixes #889) + - [mod_*cgi,mod_accesslog] Fix splitting :port with ipv6 (fixes + #2333, thx simoncpu) + - Detect multiple -f options: show error message instead of + assert (fixes #2416) + - [mod_extforward] Support ipv6 addresses (fixes #1889) + - [mod_redirect] Support url.redirect-code option (fixes #2247) + - Fix --enable-mmap handling in configure.ac + +------------------------------------------------------------------- Old: ---- lighttpd_1.4.30.orig.tar.bz2 New: ---- lighttpd-automake.patch lighttpd_1.4.31.orig.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ lighttpd.spec ++++++ --- /var/tmp/diff_new_pack.FpuHIZ/_old 2012-06-10 21:51:42.000000000 +0200 +++ /var/tmp/diff_new_pack.FpuHIZ/_new 2012-06-10 21:51:42.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package lighttpd # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,22 +15,31 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild - Name: lighttpd -Version: 1.4.30 +Version: 1.4.31 Release: 0 # %define pkg_name lighttpd %define pkg_user lighttpd %define pkg_home /var/lib/%{pkg_name} # -Group: Productivity/Networking/Web/Servers -License: BSD-3-Clause -# BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: FastCGI-devel e2fsprogs-devel fam-devel gdbm-devel libattr-devel libmemcache-devel libxml2-devel mysql-devel openldap2-devel pcre-devel pkgconfig pwdutils zlib-devel automake +BuildRequires: FastCGI-devel +BuildRequires: automake +BuildRequires: e2fsprogs-devel +BuildRequires: fam-devel +BuildRequires: gdbm-devel +BuildRequires: libattr-devel +BuildRequires: libmemcache-devel +BuildRequires: libtool +BuildRequires: libxml2-devel +BuildRequires: mysql-devel +BuildRequires: openldap2-devel +BuildRequires: pcre-devel +BuildRequires: pkgconfig +BuildRequires: pwdutils +BuildRequires: zlib-devel # %define with_tests 1 %define with_enh_webdav 1 @@ -83,7 +92,7 @@ # Url: http://www.lighttpd.net/ # Source: http://www.lighttpd.net/download/%{pkg_name}-%{version}.tar.bz2 -Source: lighttpd_1.4.30.orig.tar.bz2 +Source: lighttpd_%{version}.orig.tar.bz2 Source1: %{pkg_name}.init Source2: %{pkg_name}.sysconfig Source4: lightytest.sh @@ -93,8 +102,12 @@ # this is just dummy to pass the check for factory and still have one package for deb and rpm Source99: lighttpd_1.4.30-0.1.debian.tar.gz Patch: lighttpd-1.4.13_geoip.patch +Patch1: lighttpd-automake.patch # Summary: A Secure, Fast, Compliant, and Very Flexible Web Server +License: BSD-3-Clause +Group: Productivity/Networking/Web/Servers + %description Lighttpd is a secure, fast, compliant, and very flexible Web server that has been optimized for high-performance environments. It has a @@ -110,10 +123,10 @@ Jan Kneschke <j...@kneschke.de> %package mod_cml -License: BSD-3-Clause Requires: %{name} = %{version} -Group: Productivity/Networking/Web/Servers Summary: CML (Cache Meta Language) module for Lighttpd +Group: Productivity/Networking/Web/Servers + %description mod_cml CML is a Meta language to describe the dependencies of a page at one side and building a page from its fragments on the oth er side using @@ -138,10 +151,10 @@ Jan Kneschke <j...@kneschke.de> %package mod_magnet -License: BSD-3-Clause Requires: %{name} = %{version} -Group: Productivity/Networking/Web/Servers Summary: A module to control the request handling in lighttpd +Group: Productivity/Networking/Web/Servers + %description mod_magnet A module to control the request handling in lighttpd. @@ -154,10 +167,10 @@ Jan Kneschke <j...@kneschke.de> %package mod_mysql_vhost -License: BSD-3-Clause Requires: %{name} = %{version} -Group: Productivity/Networking/Web/Servers Summary: MySQL based virtual hosts (vhosts) module for Lighttpd +Group: Productivity/Networking/Web/Servers + %description mod_mysql_vhost With MySQL based vhosting you can put the information where to look for a. document-root of a given host into a MySQL database. @@ -169,10 +182,10 @@ Jan Kneschke <j...@kneschke.de> %package mod_trigger_b4_dl -License: BSD-3-Clause Requires: %{name} = %{version} -Group: Productivity/Networking/Web/Servers Summary: Another anti hot-linking module for Lighttpd +Group: Productivity/Networking/Web/Servers + %description mod_trigger_b4_dl Anti Hotlinking: @@ -195,11 +208,11 @@ Jan Kneschke <j...@kneschke.de> %package mod_rrdtool -License: BSD-3-Clause Requires: %{name} = %{version} Requires: rrdtool -Group: Productivity/Networking/Web/Servers Summary: Lighttpd module to feed rrdtool databases +Group: Productivity/Networking/Web/Servers + %description mod_rrdtool RRD_tool is a system to store and display time-series data (i.e. network bandwidth, machine-room temperature, server load average). @@ -216,10 +229,10 @@ %if 0%{?with_geoip} %package mod_geoip -License: BSD-3-Clause Requires: %{name} = %{version} -Group: Productivity/Networking/Web/Servers Summary: A Secure, Fast, Compliant, and Very Flexible Web Server +Group: Productivity/Networking/Web/Servers + %description mod_geoip Lighttpd a secure, fast, compliant, and very flexible Web server that has been optimized for high-performance environments. It has a very low @@ -240,10 +253,10 @@ %endif %package mod_webdav -License: BSD-3-Clause Requires: %{name} = %{version} -Group: Productivity/Networking/Web/Servers Summary: WebDAV module for Lighttpd +Group: Productivity/Networking/Web/Servers + %description mod_webdav The WebDAV module is a very minimalistic implementation of RFC 2518. Minimalistic means that not all operations are implementated yet.. @@ -275,12 +288,13 @@ %setup %if 0%{?with_geoip} %patch +%patch1 -p1 %endif perl -p -i -e 's| tar-ustar||g' configure.ac %build %if 0%{?with_geoip} -autoreconf +autoreconf -fi %endif export CFLAGS="%{optflags} -DLDAP_DEPRECATED -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -std=gnu99" %if %suse_version > 1000 ++++++ lighttpd-automake.patch ++++++ Index: lighttpd-1.4.31/configure.ac =================================================================== --- lighttpd-1.4.31.orig/configure.ac +++ lighttpd-1.4.31/configure.ac @@ -23,6 +23,7 @@ AC_PROG_CPP dnl AC_PROG_CXX AC_PROG_LN_S AC_PROG_MAKE_SET +AM_PROG_AR dnl check environment AC_AIX @@ -39,7 +40,7 @@ AM_CONDITIONAL(NO_RDYNAMIC, test x$NO_RD AC_EXEEXT dnl more automake stuff -AM_C_PROTOTYPES +dnl AM_C_PROTOTYPES dnl libtool AC_DISABLE_STATIC ++++++ lighttpd_1.4.30.orig.tar.bz2 -> lighttpd_1.4.31.orig.tar.bz2 ++++++ ++++ 4395 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lighttpd-1.4.30/NEWS new/lighttpd-1.4.31/NEWS --- old/lighttpd-1.4.30/NEWS 2011-12-18 13:54:45.000000000 +0100 +++ new/lighttpd-1.4.31/NEWS 2012-05-31 16:52:16.000000000 +0200 @@ -3,7 +3,23 @@ NEWS ==== -- 1.4.30 - +- 1.4.31 - + * [ssl] fix segfault in counting renegotiations for openssl versions without TLSEXT/SNI (thx carpii for reporting) + * Move fdevent subsystem includes to implementation files to reduce conflicts (fixes #2373) + * [mod_compress] fix handling if etags are disabled but cache-dir is set - may lead to double response + * disable mmap by default (fixes #2391) + * buffer_caseless_compare: always convert letters to lowercase to get transitive results, fixing array lookups (fixes #2405) + * Fix handling of empty header list entries in http_request_split_value, fixing invalid read in valgrind (fixes #2413) + * Fix access log escaping of " and \\ (fixes #1551) + * [mod_auth] Fix digest "md5-sess" implementation (Errata ID 1649, RFC 2617) (fixes #2410) + * [auth] Add "AUTH_TYPE" environment (for *cgi), remove fastcgi specific workaround, add fastcgi test case (fixes #889) + * [mod_*cgi,mod_accesslog] Fix splitting :port with ipv6 (fixes #2333, thx simoncpu) + * Detect multiple -f options: show error message instead of assert (fixes #2416) + * [mod_extforward] Support ipv6 addresses (fixes #1889) + * [mod_redirect] Support url.redirect-code option (fixes #2247) + * Fix --enable-mmap handling in configure.ac + +- 1.4.30 - 2011-12-18 * Always use our 'own' md5 implementation, fixes linking issues on MacOS (fixes #2331) * Limit amount of bytes we send in one go; fixes stalling in one connection and timeouts on slow systems. * [ssl] fix build errors when Elliptic-Curve Diffie-Hellman is disabled diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lighttpd-1.4.30/SConstruct new/lighttpd-1.4.31/SConstruct --- old/lighttpd-1.4.30/SConstruct 2011-07-03 18:33:21.000000000 +0200 +++ new/lighttpd-1.4.31/SConstruct 2011-12-18 17:34:16.000000000 +0100 @@ -5,7 +5,7 @@ from stat import * package = 'lighttpd' -version = '1.4.30' +version = '1.4.31' def checkCHeaders(autoconf, hdrs): p = re.compile('[^A-Z0-9]') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lighttpd-1.4.30/config.h.in new/lighttpd-1.4.31/config.h.in --- old/lighttpd-1.4.30/config.h.in 2011-12-18 15:54:19.000000000 +0100 +++ new/lighttpd-1.4.31/config.h.in 2012-05-31 17:10:53.000000000 +0200 @@ -1,5 +1,8 @@ /* config.h.in. Generated from configure.ac by autoheader. */ +/* Use mmap if available */ +#undef ENABLE_MMAP + /* Define to 1 if you have the <arpa/inet.h> header file. */ #undef HAVE_ARPA_INET_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lighttpd-1.4.30/configure.ac new/lighttpd-1.4.31/configure.ac --- old/lighttpd-1.4.30/configure.ac 2011-07-03 18:33:11.000000000 +0200 +++ new/lighttpd-1.4.31/configure.ac 2012-05-31 16:49:18.000000000 +0200 @@ -1,7 +1,7 @@ dnl -*- Autoconf -*- dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.57) -AC_INIT([lighttpd], [1.4.30], [cont...@lighttpd.net]) +AC_INIT([lighttpd], [1.4.31], [cont...@lighttpd.net]) AC_CONFIG_SRCDIR([src/server.c]) AC_CONFIG_HEADER([config.h]) AC_CONFIG_MACRO_DIR([m4]) @@ -569,6 +569,21 @@ fi fi +# disable mmap by default; if a mmapped file gets truncated, the process gets a SIGBUS signal +# on reading the truncated area which we can't handle (yet). +# lighttpd may always use mmap with files it owns (created tmp files) +AC_ARG_ENABLE(mmap, + AC_HELP_STRING([--enable-mmap],[use mmap if available (DANGEROUS, allows local users to trigger SIGBUS crashes)]), + [case "${enableval}" in + yes) mmap=true ;; + no) mmap=false ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-mmap) ;; + esac],[mmap=false]) + +if test x$mmap = xtrue; then + AC_DEFINE(ENABLE_MMAP, [1], [Use mmap if available]) +fi + AM_CONDITIONAL(CROSS_COMPILING, test "x$cross_compiling" = xyes) @@ -610,6 +625,7 @@ doc/config/Makefile \ doc/scripts/Makefile \ doc/initscripts/Makefile \ + doc/systemd/Makefile \ doc/outdated/Makefile \ doc/Makefile \ tests/Makefile \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lighttpd-1.4.30/doc/Makefile.am new/lighttpd-1.4.31/doc/Makefile.am --- old/lighttpd-1.4.30/doc/Makefile.am 2011-06-13 14:50:32.000000000 +0200 +++ new/lighttpd-1.4.31/doc/Makefile.am 2011-12-23 11:31:43.000000000 +0100 @@ -1,4 +1,4 @@ -SUBDIRS=config scripts initscripts outdated +SUBDIRS=config scripts initscripts systemd outdated dist_man8_MANS=lighttpd.8 EXTRA_DIST= \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lighttpd-1.4.30/doc/systemd/Makefile.am new/lighttpd-1.4.31/doc/systemd/Makefile.am --- old/lighttpd-1.4.30/doc/systemd/Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ new/lighttpd-1.4.31/doc/systemd/Makefile.am 2011-12-23 11:31:43.000000000 +0100 @@ -0,0 +1 @@ +EXTRA_DIST=lighttpd.service diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lighttpd-1.4.30/doc/systemd/lighttpd.service new/lighttpd-1.4.31/doc/systemd/lighttpd.service --- old/lighttpd-1.4.30/doc/systemd/lighttpd.service 1970-01-01 01:00:00.000000000 +0100 +++ new/lighttpd-1.4.31/doc/systemd/lighttpd.service 2011-12-18 15:35:59.000000000 +0100 @@ -0,0 +1,10 @@ +[Unit] +Description=Lighttpd Daemon +After=network.target + +[Service] +ExecStartPre=/usr/sbin/lighttpd -t -f /etc/lighttpd/lighttpd.conf +ExecStart=/usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf + +[Install] +WantedBy=multi-user.target diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lighttpd-1.4.30/src/buffer.c new/lighttpd-1.4.31/src/buffer.c --- old/lighttpd-1.4.30/src/buffer.c 2010-08-17 11:04:38.000000000 +0200 +++ new/lighttpd-1.4.31/src/buffer.c 2012-04-08 09:57:24.000000000 +0200 @@ -566,15 +566,14 @@ max_ndx = ((a_len < b_len) ? a_len : b_len); for (; ndx < max_ndx; ndx++) { - char a1 = *a++, b1 = *b++; + int a1 = *a++, b1 = *b++; if (a1 != b1) { - if ((a1 >= 'A' && a1 <= 'Z') && (b1 >= 'a' && b1 <= 'z')) - a1 |= 32; - else if ((a1 >= 'a' && a1 <= 'z') && (b1 >= 'A' && b1 <= 'Z')) - b1 |= 32; - if ((a1 - b1) != 0) return (a1 - b1); + /* always lowercase for transitive results */ + if (a1 >= 'A' && a1 <= 'Z') a1 |= 32; + if (b1 >= 'A' && b1 <= 'Z') b1 |= 32; + if ((a1 - b1) != 0) return (a1 - b1); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lighttpd-1.4.30/src/connections.c new/lighttpd-1.4.31/src/connections.c --- old/lighttpd-1.4.30/src/connections.c 2011-11-30 18:42:45.000000000 +0100 +++ new/lighttpd-1.4.31/src/connections.c 2011-12-23 11:31:43.000000000 +0100 @@ -1360,9 +1360,7 @@ } con->renegotiations = 0; -#ifndef OPENSSL_NO_TLSEXT SSL_set_app_data(con->ssl, con); -#endif SSL_set_accept_state(con->ssl); con->conf.is_ssl=1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lighttpd-1.4.30/src/fdevent.h new/lighttpd-1.4.31/src/fdevent.h --- old/lighttpd-1.4.30/src/fdevent.h 2011-06-13 16:10:46.000000000 +0200 +++ new/lighttpd-1.4.31/src/fdevent.h 2011-12-25 16:20:30.000000000 +0100 @@ -20,18 +20,12 @@ #if defined(HAVE_EPOLL_CTL) && defined(HAVE_SYS_EPOLL_H) # define USE_LINUX_EPOLL -# include <sys/epoll.h> #endif /* MacOS 10.3.x has poll.h under /usr/include/, all other unixes * under /usr/include/sys/ */ #if defined HAVE_POLL && (defined(HAVE_SYS_POLL_H) || defined(HAVE_POLL_H)) # define USE_POLL -# ifdef HAVE_POLL_H -# include <poll.h> -# else -# include <sys/poll.h> -# endif #endif #if defined HAVE_SELECT @@ -46,7 +40,6 @@ #if defined HAVE_SYS_DEVPOLL_H && defined(__sun) # define USE_SOLARIS_DEVPOLL -# include <sys/devpoll.h> #endif #if defined HAVE_PORT_H && defined HAVE_PORT_CREATE && defined(__sun) @@ -56,12 +49,10 @@ #if defined HAVE_SYS_EVENT_H && defined HAVE_KQUEUE # define USE_FREEBSD_KQUEUE -# include <sys/event.h> #endif #if defined HAVE_LIBEV # define USE_LIBEV -# include <ev.h> #endif struct server; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lighttpd-1.4.30/src/fdevent_freebsd_kqueue.c new/lighttpd-1.4.31/src/fdevent_freebsd_kqueue.c --- old/lighttpd-1.4.30/src/fdevent_freebsd_kqueue.c 2010-08-17 11:37:35.000000000 +0200 +++ new/lighttpd-1.4.31/src/fdevent_freebsd_kqueue.c 2011-12-25 16:20:37.000000000 +0100 @@ -13,8 +13,8 @@ #include <fcntl.h> #ifdef USE_FREEBSD_KQUEUE -#include <sys/event.h> -#include <sys/time.h> +# include <sys/event.h> +# include <sys/time.h> static void fdevent_freebsd_kqueue_free(fdevents *ev) { close(ev->kq_fd); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lighttpd-1.4.30/src/fdevent_libev.c new/lighttpd-1.4.31/src/fdevent_libev.c --- old/lighttpd-1.4.30/src/fdevent_libev.c 2010-08-17 11:07:45.000000000 +0200 +++ new/lighttpd-1.4.31/src/fdevent_libev.c 2011-12-25 16:19:29.000000000 +0100 @@ -5,6 +5,9 @@ #include <assert.h> #ifdef USE_LIBEV + +# include <ev.h> + static void io_watcher_cb(struct ev_loop *loop, ev_io *w, int revents) { fdevents *ev = w->data; fdnode *fdn = ev->fdarray[w->fd]; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lighttpd-1.4.30/src/fdevent_linux_sysepoll.c new/lighttpd-1.4.31/src/fdevent_linux_sysepoll.c --- old/lighttpd-1.4.30/src/fdevent_linux_sysepoll.c 2010-08-17 11:10:43.000000000 +0200 +++ new/lighttpd-1.4.31/src/fdevent_linux_sysepoll.c 2011-12-25 16:19:23.000000000 +0100 @@ -13,6 +13,9 @@ #include <fcntl.h> #ifdef USE_LINUX_EPOLL + +# include <sys/epoll.h> + static void fdevent_linux_sysepoll_free(fdevents *ev) { close(ev->epoll_fd); free(ev->epoll_events); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lighttpd-1.4.30/src/fdevent_poll.c new/lighttpd-1.4.31/src/fdevent_poll.c --- old/lighttpd-1.4.30/src/fdevent_poll.c 2010-08-17 11:38:28.000000000 +0200 +++ new/lighttpd-1.4.31/src/fdevent_poll.c 2011-12-25 16:19:53.000000000 +0100 @@ -13,6 +13,13 @@ #include <fcntl.h> #ifdef USE_POLL + +# ifdef HAVE_POLL_H +# include <poll.h> +# else +# include <sys/poll.h> +# endif + static void fdevent_poll_free(fdevents *ev) { free(ev->pollfds); if (ev->unused.ptr) free(ev->unused.ptr); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lighttpd-1.4.30/src/fdevent_solaris_devpoll.c new/lighttpd-1.4.31/src/fdevent_solaris_devpoll.c --- old/lighttpd-1.4.30/src/fdevent_solaris_devpoll.c 2010-08-17 11:38:08.000000000 +0200 +++ new/lighttpd-1.4.31/src/fdevent_solaris_devpoll.c 2011-12-25 16:20:19.000000000 +0100 @@ -14,6 +14,8 @@ #ifdef USE_SOLARIS_DEVPOLL +# include <sys/devpoll.h> + static void fdevent_solaris_devpoll_free(fdevents *ev) { free(ev->devpollfds); close(ev->devpoll_fd); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lighttpd-1.4.30/src/http_auth.c new/lighttpd-1.4.31/src/http_auth.c --- old/lighttpd-1.4.30/src/http_auth.c 2011-11-29 12:36:18.000000000 +0100 +++ new/lighttpd-1.4.31/src/http_auth.c 2012-05-17 11:29:24.000000000 +0200 @@ -1016,7 +1016,7 @@ log_error_write(srv, __FILE__, __LINE__, "ss", "realm", realm); log_error_write(srv, __FILE__, __LINE__, "ss", "nonce", nonce); log_error_write(srv, __FILE__, __LINE__, "ss", "uri", uri); - log_error_write(srv, __FILE__, __LINE__, "ss", "algorigthm", algorithm); + log_error_write(srv, __FILE__, __LINE__, "ss", "algorithm", algorithm); log_error_write(srv, __FILE__, __LINE__, "ss", "qop", qop); log_error_write(srv, __FILE__, __LINE__, "ss", "cnonce", cnonce); log_error_write(srv, __FILE__, __LINE__, "ss", "nc", nc); @@ -1095,7 +1095,9 @@ if (algorithm && strcasecmp(algorithm, "md5-sess") == 0) { li_MD5_Init(&Md5Ctx); - li_MD5_Update(&Md5Ctx, (unsigned char *)HA1, 16); + /* Errata ID 1649: http://www.rfc-editor.org/errata_search.php?rfc=2617 */ + CvtHex(HA1, a1); + li_MD5_Update(&Md5Ctx, (unsigned char *)a1, 32); li_MD5_Update(&Md5Ctx, (unsigned char *)":", 1); li_MD5_Update(&Md5Ctx, (unsigned char *)nonce, strlen(nonce)); li_MD5_Update(&Md5Ctx, (unsigned char *)":", 1); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lighttpd-1.4.30/src/mod_accesslog.c new/lighttpd-1.4.31/src/mod_accesslog.c --- old/lighttpd-1.4.30/src/mod_accesslog.c 2010-08-17 11:04:38.000000000 +0200 +++ new/lighttpd-1.4.31/src/mod_accesslog.c 2012-04-19 14:57:24.000000000 +0200 @@ -165,7 +165,8 @@ buffer_prepare_append(dest, str->used - 1); for (ptr = start = str->ptr, end = str->ptr + str->used - 1; ptr < end; ptr++) { - if (*ptr >= ' ' && *ptr <= '~') { + char const c = *ptr; + if (c >= ' ' && c <= '~' && c != '"' && c != '\\') { /* nothing to change, add later as one block */ } else { /* copy previous part */ @@ -174,7 +175,7 @@ } start = ptr + 1; - switch (*ptr) { + switch (c) { case '"': BUFFER_APPEND_STRING_CONST(dest, "\\\""); break; @@ -199,9 +200,9 @@ default: { /* non printable char => \xHH */ char hh[5] = {'\\','x',0,0,0}; - char h = *ptr / 16; + char h = c / 16; hh[2] = (h > 9) ? (h - 10 + 'A') : (h + '0'); - h = *ptr % 16; + h = c % 16; hh[3] = (h > 9) ? (h - 10 + 'A') : (h + '0'); buffer_append_string_len(dest, &hh[0], 4); } @@ -858,7 +859,13 @@ break; case FORMAT_SERVER_PORT: { - char *colon = strrchr(((server_socket*)(con->srv_socket))->srv_token->ptr, ':'); + const char *colon; + buffer *srvtoken = ((server_socket*)(con->srv_socket))->srv_token; + if (srvtoken->ptr[0] == '[') { + colon = strstr(srvtoken->ptr, "]:"); + } else { + colon = strchr(srvtoken->ptr, ':'); + } if (colon) { buffer_append_string(b, colon+1); } else { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lighttpd-1.4.30/src/mod_auth.c new/lighttpd-1.4.31/src/mod_auth.c --- old/lighttpd-1.4.30/src/mod_auth.c 2011-09-05 11:26:36.000000000 +0200 +++ new/lighttpd-1.4.31/src/mod_auth.c 2012-04-19 14:05:52.000000000 +0200 @@ -181,6 +181,7 @@ size_t k; int auth_required = 0, auth_satisfied = 0; char *http_authorization = NULL; + const char *auth_type = NULL; data_string *ds; mod_auth_plugin_data *p = p_d; array *req; @@ -245,12 +246,14 @@ if ((auth_type_len == 5) && (0 == strncasecmp(http_authorization, "Basic", auth_type_len))) { + auth_type = "Basic"; if (0 == strcmp(method->value->ptr, "basic")) { auth_satisfied = http_auth_basic_check(srv, con, p, req, con->uri.path, auth_realm+1); } } else if ((auth_type_len == 6) && (0 == strncasecmp(http_authorization, "Digest", auth_type_len))) { + auth_type = "Digest"; if (0 == strcmp(method->value->ptr, "digest")) { if (-1 == (auth_satisfied = http_auth_digest_check(srv, con, p, req, con->uri.path, auth_realm+1))) { con->http_status = 400; @@ -302,6 +305,17 @@ /* the REMOTE_USER header */ buffer_copy_string_buffer(con->authed_user, p->auth_user); + + /* AUTH_TYPE environment */ + + if (NULL == (ds = (data_string *)array_get_unused_element(con->environment, TYPE_STRING))) { + ds = data_string_init(); + } + + buffer_copy_string(ds->key, "AUTH_TYPE"); + buffer_copy_string(ds->value, auth_type); + + array_insert_unique(con->environment, (data_unset *)ds); } return HANDLER_GO_ON; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lighttpd-1.4.30/src/mod_cgi.c new/lighttpd-1.4.31/src/mod_cgi.c --- old/lighttpd-1.4.30/src/mod_cgi.c 2011-12-18 13:52:52.000000000 +0100 +++ new/lighttpd-1.4.31/src/mod_cgi.c 2012-04-19 14:57:34.000000000 +0200 @@ -811,8 +811,14 @@ if (!buffer_is_empty(con->server_name)) { size_t len = con->server_name->used - 1; - char *colon = strchr(con->server_name->ptr, ':'); - if (colon) len = colon - con->server_name->ptr; + + if (con->server_name->ptr[0] == '[') { + const char *colon = strstr(con->server_name->ptr, "]:"); + if (colon) len = (colon + 1) - con->server_name->ptr; + } else { + const char *colon = strchr(con->server_name->ptr, ':'); + if (colon) len = colon - con->server_name->ptr; + } cgi_env_add(&env, CONST_STR_LEN("SERVER_NAME"), con->server_name->ptr, len); } else { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lighttpd-1.4.30/src/mod_compress.c new/lighttpd-1.4.31/src/mod_compress.c --- old/lighttpd-1.4.30/src/mod_compress.c 2011-06-13 13:17:02.000000000 +0200 +++ new/lighttpd-1.4.31/src/mod_compress.c 2012-02-22 10:03:28.000000000 +0100 @@ -485,7 +485,7 @@ return -1; } - +#ifdef USE_MMAP if (MAP_FAILED == (start = mmap(NULL, sce->st.st_size, PROT_READ, MAP_SHARED, ifd, 0))) { log_error_write(srv, __FILE__, __LINE__, "sbss", "mmaping", fn, "failed", strerror(errno)); @@ -499,6 +499,23 @@ return -1; } +#else + start = malloc(sce->st.st_size); + if (NULL == start || sce->st.st_size != read(ifd, start, sce->st.st_size)) { + log_error_write(srv, __FILE__, __LINE__, "sbss", "reading", fn, "failed", strerror(errno)); + + close(ofd); + close(ifd); + free(start); + + /* Remove the incomplete cache file, so that later hits aren't served from it */ + if (-1 == unlink(p->ofn->ptr)) { + log_error_write(srv, __FILE__, __LINE__, "sbss", "unlinking incomplete cachefile", p->ofn, "failed:", strerror(errno)); + } + + return -1; + } +#endif switch(type) { #ifdef USE_ZLIB @@ -530,7 +547,12 @@ } } +#ifdef USE_MMAP munmap(start, sce->st.st_size); +#else + free(start); +#endif + close(ofd); close(ifd); @@ -571,13 +593,23 @@ return -1; } - +#ifdef USE_MMAP if (MAP_FAILED == (start = mmap(NULL, sce->st.st_size, PROT_READ, MAP_SHARED, ifd, 0))) { log_error_write(srv, __FILE__, __LINE__, "sbss", "mmaping", fn, "failed", strerror(errno)); close(ifd); return -1; } +#else + start = malloc(sce->st.st_size); + if (NULL == start || sce->st.st_size != read(ifd, start, sce->st.st_size)) { + log_error_write(srv, __FILE__, __LINE__, "sbss", "reading", fn, "failed", strerror(errno)); + + close(ifd); + free(start); + return -1; + } +#endif switch(type) { #ifdef USE_ZLIB @@ -598,7 +630,11 @@ break; } +#ifdef USE_MMAP munmap(start, sce->st.st_size); +#else + free(start); +#endif close(ifd); if (ret != 0) return -1; @@ -826,7 +862,7 @@ } response_header_overwrite(srv, con, CONST_STR_LEN("Content-Type"), CONST_BUF_LEN(sce->content_type)); /* let mod_staticfile handle the cached compressed files, physical path was modified */ - return p->conf.compress_cache_dir->used ? HANDLER_GO_ON : HANDLER_FINISHED; + return (use_etag && p->conf.compress_cache_dir->used) ? HANDLER_GO_ON : HANDLER_FINISHED; } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lighttpd-1.4.30/src/mod_extforward.c new/lighttpd-1.4.31/src/mod_extforward.c --- old/lighttpd-1.4.30/src/mod_extforward.c 2010-08-17 11:04:38.000000000 +0200 +++ new/lighttpd-1.4.31/src/mod_extforward.c 2012-05-18 15:22:26.000000000 +0200 @@ -241,14 +241,14 @@ int in_str = 0; for (base = pbuffer->ptr, curr = pbuffer->ptr; *curr; curr++) { if (in_str) { - if ((*curr > '9' || *curr < '0') && *curr != '.' && *curr != ':') { + if ((*curr > '9' || *curr < '0') && *curr != '.' && *curr != ':' && (*curr < 'a' || *curr > 'f') && (*curr < 'A' || *curr > 'F')) { /* found an separator , insert value into result array */ put_string_into_array_len(result, base, curr - base); /* change state to not in string */ in_str = 0; } } else { - if (*curr >= '0' && *curr <= '9') { + if ((*curr >= '0' && *curr <= '9') || *curr == ':' || (*curr >= 'a' && *curr <= 'f') || (*curr >= 'A' && *curr <= 'F')) { /* found leading char of an IP address, move base pointer and change state */ base = curr; in_str = 1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lighttpd-1.4.30/src/mod_fastcgi.c new/lighttpd-1.4.31/src/mod_fastcgi.c --- old/lighttpd-1.4.30/src/mod_fastcgi.c 2011-08-20 15:47:09.000000000 +0200 +++ new/lighttpd-1.4.31/src/mod_fastcgi.c 2012-04-19 14:51:10.000000000 +0200 @@ -1857,8 +1857,14 @@ if (con->server_name->used) { size_t len = con->server_name->used - 1; - char *colon = strchr(con->server_name->ptr, ':'); - if (colon) len = colon - con->server_name->ptr; + + if (con->server_name->ptr[0] == '[') { + const char *colon = strstr(con->server_name->ptr, "]:"); + if (colon) len = (colon + 1) - con->server_name->ptr; + } else { + const char *colon = strchr(con->server_name->ptr, ':'); + if (colon) len = colon - con->server_name->ptr; + } FCGI_ENV_ADD_CHECK(fcgi_env_add(p->fcgi_env, CONST_STR_LEN("SERVER_NAME"), con->server_name->ptr, len),con) } else { @@ -1910,36 +1916,7 @@ FCGI_ENV_ADD_CHECK(fcgi_env_add(p->fcgi_env, CONST_STR_LEN("REMOTE_ADDR"), s, strlen(s)),con) if (!buffer_is_empty(con->authed_user)) { - /* AUTH_TYPE fix by Troy Kruthoff (tkruth...@gmail.com) - * section 4.1.1 of RFC 3875 (cgi spec) requires the server to set a AUTH_TYPE env - * declaring the type of authentication used. (see http://tools.ietf.org/html/rfc3875#page-11) - * - * I copied this code from mod_auth.c where it extracts auth info from the "Authorization" - * header to authenticate the user before allowing the request to proceed. I'm guessing it makes - * sense to re-parse the header here, as mod_auth is unaware if the request is headed for cgi/fcgi. - * Someone more familiar with the lighty internals should be able to quickly determine if we are - * better storing AUTH_TYPE on the initial parse in mod_auth. - */ - char *http_authorization = NULL; - data_string *ds; - FCGI_ENV_ADD_CHECK(fcgi_env_add(p->fcgi_env, CONST_STR_LEN("REMOTE_USER"), CONST_BUF_LEN(con->authed_user)),con) - - if (NULL != (ds = (data_string *)array_get_element(con->request.headers, "Authorization"))) { - http_authorization = ds->value->ptr; - } - - if (ds && ds->value && ds->value->used) { - char *auth_realm; - if (NULL != (auth_realm = strchr(http_authorization, ' '))) { - int auth_type_len = auth_realm - http_authorization; - if ((auth_type_len == 5) && (0 == strncmp(http_authorization, "Basic", auth_type_len))) { - fcgi_env_add(p->fcgi_env, CONST_STR_LEN("AUTH_TYPE"), CONST_STR_LEN("Basic")); - } else if ((auth_type_len == 6) && (0 == strncmp(http_authorization, "Digest", auth_type_len))) { - fcgi_env_add(p->fcgi_env, CONST_STR_LEN("AUTH_TYPE"), CONST_STR_LEN("Digest")); - } - } - } } if (con->request.content_length > 0 && host->mode != FCGI_AUTHORIZER) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lighttpd-1.4.30/src/mod_redirect.c new/lighttpd-1.4.31/src/mod_redirect.c --- old/lighttpd-1.4.30/src/mod_redirect.c 2010-08-17 11:04:38.000000000 +0200 +++ new/lighttpd-1.4.31/src/mod_redirect.c 2012-05-30 18:54:43.000000000 +0200 @@ -12,6 +12,8 @@ typedef struct { pcre_keyvalue_buffer *redirect; data_config *context; /* to which apply me */ + + unsigned short redirect_code; } plugin_config; typedef struct { @@ -68,6 +70,7 @@ config_values_t cv[] = { { "url.redirect", NULL, T_CONFIG_LOCAL, T_CONFIG_SCOPE_CONNECTION }, /* 0 */ + { "url.redirect-code", NULL, T_CONFIG_SHORT, T_CONFIG_SCOPE_CONNECTION }, /* 1 */ { NULL, NULL, T_CONFIG_UNSET, T_CONFIG_SCOPE_UNSET } }; @@ -84,8 +87,10 @@ s = calloc(1, sizeof(plugin_config)); s->redirect = pcre_keyvalue_buffer_init(); + s->redirect_code = 301; cv[0].destination = s->redirect; + cv[1].destination = &(s->redirect_code); p->config_storage[i] = s; ca = ((data_config *)srv->config_context->data[i])->value; @@ -136,6 +141,7 @@ plugin_config *s = p->config_storage[0]; p->conf.redirect = s->redirect; + p->conf.redirect_code = s->redirect_code; p->conf.context = NULL; /* skip the first, the global context */ @@ -153,6 +159,8 @@ if (0 == strcmp(du->key->ptr, "url.redirect")) { p->conf.redirect = s->redirect; p->conf.context = dc; + } else if (0 == strcmp(du->key->ptr, "url.redirect-code")) { + p->conf.redirect_code = s->redirect_code; } } } @@ -246,7 +254,7 @@ response_header_insert(srv, con, CONST_STR_LEN("Location"), CONST_BUF_LEN(p->location)); - con->http_status = 301; + con->http_status = p->conf.redirect_code > 99 && p->conf.redirect_code < 1000 ? p->conf.redirect_code : 301; con->mode = DIRECT; con->file_finished = 1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lighttpd-1.4.30/src/mod_scgi.c new/lighttpd-1.4.31/src/mod_scgi.c --- old/lighttpd-1.4.30/src/mod_scgi.c 2011-08-20 15:47:24.000000000 +0200 +++ new/lighttpd-1.4.31/src/mod_scgi.c 2012-04-19 14:57:39.000000000 +0200 @@ -1484,8 +1484,14 @@ if (con->server_name->used) { size_t len = con->server_name->used - 1; - char *colon = strchr(con->server_name->ptr, ':'); - if (colon) len = colon - con->server_name->ptr; + + if (con->server_name->ptr[0] == '[') { + const char *colon = strstr(con->server_name->ptr, "]:"); + if (colon) len = (colon + 1) - con->server_name->ptr; + } else { + const char *colon = strchr(con->server_name->ptr, ':'); + if (colon) len = colon - con->server_name->ptr; + } scgi_env_add(p->scgi_env, CONST_STR_LEN("SERVER_NAME"), con->server_name->ptr, len); } else { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lighttpd-1.4.30/src/network.c new/lighttpd-1.4.31/src/network.c --- old/lighttpd-1.4.30/src/network.c 2011-11-30 21:50:09.000000000 +0100 +++ new/lighttpd-1.4.31/src/network.c 2011-12-27 14:45:02.000000000 +0100 @@ -25,6 +25,14 @@ # include <openssl/ssl.h> # include <openssl/err.h> # include <openssl/rand.h> +# include <openssl/dh.h> +# include <openssl/bn.h> + +# if OPENSSL_VERSION_NUMBER >= 0x0090800fL +# ifndef OPENSSL_NO_ECDH +# include <openssl/ecdh.h> +# endif +# endif #endif #ifdef USE_OPENSSL diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lighttpd-1.4.30/src/network_backends.h new/lighttpd-1.4.31/src/network_backends.h --- old/lighttpd-1.4.30/src/network_backends.h 2011-08-20 15:03:30.000000000 +0200 +++ new/lighttpd-1.4.31/src/network_backends.h 2012-02-22 10:01:50.000000000 +0100 @@ -31,7 +31,7 @@ # include <sys/uio.h> #endif -#if defined HAVE_SYS_MMAN_H && defined HAVE_MMAP +#if defined HAVE_SYS_MMAN_H && defined HAVE_MMAP && defined ENABLE_MMAP # define USE_MMAP # include <sys/mman.h> /* NetBSD 1.3.x needs it */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lighttpd-1.4.30/src/request.c new/lighttpd-1.4.31/src/request.c --- old/lighttpd-1.4.30/src/request.c 2011-11-30 21:42:19.000000000 +0100 +++ new/lighttpd-1.4.31/src/request.c 2012-04-19 12:16:54.000000000 +0200 @@ -241,9 +241,11 @@ start = s; for (; *s != ',' && i < b->used - 1; i++, s++); + if (start == s) break; /* empty fields are skipped */ end = s - 1; - for (; (*end == ' ' || *end == '\t') && end > start; end--); + for (; end > start && (*end == ' ' || *end == '\t'); end--); + if (start == end) break; /* empty fields are skipped */ if (NULL == (ds = (data_string *)array_get_unused_element(vals, TYPE_STRING))) { ds = data_string_init(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lighttpd-1.4.30/src/server.c new/lighttpd-1.4.31/src/server.c --- old/lighttpd-1.4.30/src/server.c 2011-12-18 13:50:38.000000000 +0100 +++ new/lighttpd-1.4.31/src/server.c 2012-04-28 17:39:38.000000000 +0200 @@ -409,19 +409,31 @@ "\t- libev (generic)\n" #endif "\nNetwork handler:\n\n" -#if defined(USE_LINUX_SENDFILE) || defined(USE_FREEBSD_SENDFILE) || defined(USE_SOLARIS_SENDFILEV) || defined(USE_AIX_SENDFILE) - "\t+ sendfile\n" +#if defined USE_LINUX_SENDFILE + "\t+ linux-sendfile\n" #else - #ifdef USE_WRITEV + "\t- linux-sendfile\n" +#endif +#if defined USE_FREEBSD_SENDFILE + "\t+ freebsd-sendfile\n" +#else + "\t- freebsd-sendfile\n" +#endif +#if defined USE_SOLARIS_SENDFILEV + "\t+ solaris-sendfilev\n" +#else + "\t- solaris-sendfilev\n" +#endif +#if defined USE_WRITEV "\t+ writev\n" - #else +#else + "\t- writev\n" +#endif "\t+ write\n" - #endif - #ifdef USE_MMAP +#ifdef USE_MMAP "\t+ mmap support\n" - #else +#else "\t- mmap support\n" - #endif #endif "\nFeatures:\n\n" #ifdef HAVE_IPV6 @@ -570,6 +582,13 @@ while(-1 != (o = getopt(argc, argv, "f:m:hvVDpt"))) { switch(o) { case 'f': + if (srv->config_storage) { + log_error_write(srv, __FILE__, __LINE__, "s", + "Can only read one config file. Use the include command to use multiple config files."); + + server_free(srv); + return -1; + } if (config_read(srv, optarg)) { server_free(srv); return -1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lighttpd-1.4.30/tests/lighttpd.conf new/lighttpd-1.4.31/tests/lighttpd.conf --- old/lighttpd-1.4.30/tests/lighttpd.conf 2011-08-31 00:10:48.000000000 +0200 +++ new/lighttpd-1.4.31/tests/lighttpd.conf 2012-04-19 14:31:11.000000000 +0200 @@ -175,6 +175,19 @@ simple-vhost.default-host = "www.example.org" } +$HTTP["host"] == "auth.example.org" { + server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/" + server.name = "auth.example.org" + auth.backend = "htpasswd" + auth.require = ( "" => + ( + "method" => "basic", + "realm" => "download archiv", + "require" => "valid-user" + ) + ) +} + $HTTP["host"] =~ "(vvv).example.org" { url.redirect = ( "^/redirect/$" => "http://localhost:2048/" ) } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/lighttpd-1.4.30/tests/mod-fastcgi.t new/lighttpd-1.4.31/tests/mod-fastcgi.t --- old/lighttpd-1.4.30/tests/mod-fastcgi.t 2010-02-02 00:28:20.000000000 +0100 +++ new/lighttpd-1.4.31/tests/mod-fastcgi.t 2012-04-19 14:45:39.000000000 +0200 @@ -7,7 +7,7 @@ } use strict; -use Test::More tests => 56; +use Test::More tests => 58; use LightyTest; my $tf = LightyTest->new(); @@ -25,7 +25,7 @@ } SKIP: { - skip "no PHP running on port 1026", 33 unless $tf->listening_on(1026); + skip "no PHP running on port 1026", 35 unless $tf->listening_on(1026); ok($tf->start_proc == 0, "Starting lighttpd") or goto cleanup; @@ -188,6 +188,24 @@ $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'Content-Length' => 4348 } ]; ok($tf->handle_http($t) == 0, 'X-Sendfile2'); + $t->{REQUEST} = ( <<EOF +GET /get-server-env.php?env=REMOTE_USER HTTP/1.0 +Host: auth.example.org +Authorization: Basic ZGVzOmRlcw== +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'des' } ]; + ok($tf->handle_http($t) == 0, '$_SERVER["REMOTE_USER"]'); + + $t->{REQUEST} = ( <<EOF +GET /get-server-env.php?env=AUTH_TYPE HTTP/1.0 +Host: auth.example.org +Authorization: Basic ZGVzOmRlcw== +EOF + ); + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'Basic' } ]; + ok($tf->handle_http($t) == 0, '$_SERVER["AUTH_TYPE"]'); + ok($tf->stop_proc == 0, "Stopping lighttpd"); -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org