diff options
author | Krzysztof Krzyżaniak <eloy@debian.org> | 2006-10-10 08:29:38 +0000 |
---|---|---|
committer | Krzysztof Krzyżaniak <eloy@debian.org> | 2006-10-10 08:29:38 +0000 |
commit | e680360fa278059e1b6a3e5d21aa691e3408a9b6 (patch) | |
tree | f3071f853da4a3085b0dd1694e945a8dab6023ba | |
parent | e4c4e8f27b87db4084df3a3ee4f69f11f1b421af (diff) | |
download | lighttpd-e680360fa278059e1b6a3e5d21aa691e3408a9b6.tar.gz |
eloy: new upstream version
-rw-r--r-- | Makefile.in | 1 | ||||
-rw-r--r-- | NEWS | 7 | ||||
-rw-r--r-- | config.h.in | 6 | ||||
-rwxr-xr-x | configure | 325 | ||||
-rw-r--r-- | configure.in | 25 | ||||
-rw-r--r-- | cygwin/Makefile.in | 1 | ||||
-rw-r--r-- | debian/changelog | 7 | ||||
-rwxr-xr-x | debian/rules | 2 | ||||
-rw-r--r-- | doc/Makefile.am | 6 | ||||
-rw-r--r-- | doc/Makefile.in | 7 | ||||
-rw-r--r-- | doc/magnet.txt | 429 | ||||
-rw-r--r-- | openwrt/Makefile.in | 1 | ||||
-rw-r--r-- | src/Makefile.am | 4 | ||||
-rw-r--r-- | src/Makefile.in | 8 | ||||
-rw-r--r-- | src/network_linux_sendfile.c | 4 | ||||
-rw-r--r-- | src/plugin.c | 2 | ||||
-rw-r--r-- | tests/Makefile.in | 1 | ||||
-rw-r--r-- | tests/docroot/123/Makefile.in | 1 | ||||
-rw-r--r-- | tests/docroot/Makefile.in | 1 | ||||
-rw-r--r-- | tests/docroot/www/Makefile.in | 1 | ||||
-rw-r--r-- | tests/docroot/www/expire/Makefile.in | 1 | ||||
-rw-r--r-- | tests/docroot/www/go/Makefile.in | 1 | ||||
-rw-r--r-- | tests/docroot/www/indexfile/Makefile.in | 1 |
23 files changed, 797 insertions, 45 deletions
diff --git a/Makefile.in b/Makefile.in index e0911c6..365738f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -158,6 +158,7 @@ SQLITE_LIBS = @SQLITE_LIBS@ SSL_LIB = @SSL_LIB@ STRIP = @STRIP@ U = @U@ +UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CFLAGS = @XML_CFLAGS@ XML_LIBS = @XML_LIBS@ @@ -3,7 +3,7 @@ NEWS ==== -- 1.4.13 - +- 1.4.13 - 2006-10-09 * added initgroups in spawn-fcgi (#871) * added apr1 support htpasswd in mod-auth (#870) @@ -19,6 +19,11 @@ NEWS * fixed writev() on FreeBSD 4.x and older (#875) * removed warning about a 404-error-handler returned 404 + * backported and fixed the buildsystem changes for + webdav locks + * fixed plugin loading so we can finally load lua + extensions in mod_magnet scripts + * fixed large uploads if xattr is enabled - 1.4.12 - 2006-09-23 diff --git a/config.h.in b/config.h.in index cd7c39f..36f3ab7 100644 --- a/config.h.in +++ b/config.h.in @@ -334,6 +334,12 @@ /* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H +/* libuuid */ +#undef HAVE_UUID + +/* uuid/uuid.h is available */ +#undef HAVE_UUID_H + /* Define to 1 if you have the <uuid/uuid.h> header file. */ #undef HAVE_UUID_UUID_H @@ -465,7 +465,7 @@ ac_includes_default="\ # include <unistd.h> #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE EGREP CPP LN_S NO_RDYNAMIC_TRUE NO_RDYNAMIC_FALSE U ANSI2KNR ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS MYSQL_CONFIG MYSQL_LIBS MYSQL_INCLUDE LDAP_LIB LBER_LIB ATTR_LIB DL_LIB SSL_LIB PCRECONFIG PCRE_LIB Z_LIB BZ_LIB PKG_CONFIG ac_pt_PKG_CONFIG FAM_CFLAGS FAM_LIBS XML_CFLAGS XML_LIBS SQLITE_CFLAGS SQLITE_LIBS GDBM_LIB MEMCACHE_LIB LUA_CFLAGS LUA_LIBS CRYPT_LIB SENDFILE_LIB CROSS_COMPILING_TRUE CROSS_COMPILING_FALSE CHECK_WITH_FASTCGI_TRUE CHECK_WITH_FASTCGI_FALSE LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE EGREP CPP LN_S NO_RDYNAMIC_TRUE NO_RDYNAMIC_FALSE U ANSI2KNR ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS MYSQL_CONFIG MYSQL_LIBS MYSQL_INCLUDE LDAP_LIB LBER_LIB ATTR_LIB DL_LIB SSL_LIB PCRECONFIG PCRE_LIB Z_LIB BZ_LIB PKG_CONFIG ac_pt_PKG_CONFIG FAM_CFLAGS FAM_LIBS XML_CFLAGS XML_LIBS SQLITE_CFLAGS SQLITE_LIBS UUID_LIBS GDBM_LIB MEMCACHE_LIB LUA_CFLAGS LUA_LIBS CRYPT_LIB SENDFILE_LIB CROSS_COMPILING_TRUE CROSS_COMPILING_FALSE CHECK_WITH_FASTCGI_TRUE CHECK_WITH_FASTCGI_FALSE LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -1102,6 +1102,7 @@ Optional Packages: --with-bzip2 Enable bzip2 support for mod_compress --with-fam fam/gamin for reducing number of stat() calls --with-webdav-props properties in mod_webdav + --with-webdav-locks locks in mod_webdav --with-gdbm gdbm storage for mod_trigger_b4_dl --with-memcache memcached storage for mod_trigger_b4_dl --with-lua lua engine for mod_cml @@ -4927,7 +4928,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 4930 "configure"' > conftest.$ac_ext + echo '#line 4931 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -6033,7 +6034,7 @@ fi # Provide some information about the compiler. -echo "$as_me:6036:" \ +echo "$as_me:6037:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 @@ -7131,11 +7132,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7134: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7135: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7138: \$? = $ac_status" >&5 + echo "$as_me:7139: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7393,11 +7394,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7396: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7397: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7400: \$? = $ac_status" >&5 + echo "$as_me:7401: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7455,11 +7456,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7458: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7459: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:7462: \$? = $ac_status" >&5 + echo "$as_me:7463: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8840,7 +8841,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 8843 "configure"' > conftest.$ac_ext + echo '#line 8844 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -9711,7 +9712,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 9714 "configure" +#line 9715 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -9809,7 +9810,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 9812 "configure" +#line 9813 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12057,11 +12058,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12060: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12061: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:12064: \$? = $ac_status" >&5 + echo "$as_me:12065: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -12119,11 +12120,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12122: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12123: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:12126: \$? = $ac_status" >&5 + echo "$as_me:12127: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12634,7 +12635,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 12637 "configure"' > conftest.$ac_ext + echo '#line 12638 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -13505,7 +13506,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 13508 "configure" +#line 13509 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -13603,7 +13604,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 13606 "configure" +#line 13607 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -14488,11 +14489,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14491: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14492: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14495: \$? = $ac_status" >&5 + echo "$as_me:14496: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -14550,11 +14551,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14553: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14554: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:14557: \$? = $ac_status" >&5 + echo "$as_me:14558: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15915,7 +15916,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 15918 "configure"' > conftest.$ac_ext + echo '#line 15919 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -16688,11 +16689,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16691: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16692: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16695: \$? = $ac_status" >&5 + echo "$as_me:16696: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -16950,11 +16951,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16953: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16954: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16957: \$? = $ac_status" >&5 + echo "$as_me:16958: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -17012,11 +17013,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17015: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17016: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:17019: \$? = $ac_status" >&5 + echo "$as_me:17020: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -18397,7 +18398,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 18400 "configure"' > conftest.$ac_ext + echo '#line 18401 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -19268,7 +19269,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 19271 "configure" +#line 19272 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -19366,7 +19367,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 19369 "configure" +#line 19370 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -26228,7 +26229,256 @@ _ACEOF fi + + echo "$as_me:$LINENO: checking for locks in mod_webdav" >&5 +echo $ECHO_N "checking for locks in mod_webdav... $ECHO_C" >&6 + +# Check whether --with-webdav-locks or --without-webdav-locks was given. +if test "${with_webdav_locks+set}" = set; then + withval="$with_webdav_locks" + WITH_WEBDAV_LOCKS=$withval +else + WITH_WEBDAV_LOCKS=no +fi; + echo "$as_me:$LINENO: result: $WITH_WEBDAV_LOCKS" >&5 +echo "${ECHO_T}$WITH_WEBDAV_LOCKS" >&6 + + if test "$WITH_WEBDAV_LOCKS" != "no"; then + echo "$as_me:$LINENO: checking for uuid_unparse in -luuid" >&5 +echo $ECHO_N "checking for uuid_unparse in -luuid... $ECHO_C" >&6 +if test "${ac_cv_lib_uuid_uuid_unparse+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-luuid $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char uuid_unparse (); +int +main () +{ +uuid_unparse (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_uuid_uuid_unparse=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_uuid_uuid_unparse=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_uuid_uuid_unparse" >&5 +echo "${ECHO_T}$ac_cv_lib_uuid_uuid_unparse" >&6 +if test $ac_cv_lib_uuid_uuid_unparse = yes; then + + +for ac_header in uuid/uuid.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------ ## +## Report this to jan@kneschke.de ## +## ------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + + UUID_LIBS=-luuid + +cat >>confdefs.h <<\_ACEOF +#define HAVE_UUID 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_UUID_H 1 +_ACEOF + + +fi + +done + + +fi + + + fi +fi + echo "$as_me:$LINENO: checking for gdbm" >&5 echo $ECHO_N "checking for gdbm... $ECHO_C" >&6 @@ -29494,6 +29744,7 @@ s,@XML_CFLAGS@,$XML_CFLAGS,;t t s,@XML_LIBS@,$XML_LIBS,;t t s,@SQLITE_CFLAGS@,$SQLITE_CFLAGS,;t t s,@SQLITE_LIBS@,$SQLITE_LIBS,;t t +s,@UUID_LIBS@,$UUID_LIBS,;t t s,@GDBM_LIB@,$GDBM_LIB,;t t s,@MEMCACHE_LIB@,$MEMCACHE_LIB,;t t s,@LUA_CFLAGS@,$LUA_CFLAGS,;t t @@ -30326,6 +30577,14 @@ else disable_feature="$disable_feature $features" fi +features="webdav-locks" +if test "x$UUID_LIBS" \!= x; then + enable_feature="$enable_feature $features" +else + disable_feature="$disable_feature $features" +fi + + ## output $ECHO diff --git a/configure.in b/configure.in index 9c44e86..f0c789f 100644 --- a/configure.in +++ b/configure.in @@ -339,7 +339,24 @@ if test "$WITH_WEBDAV_PROPS" != "no"; then AC_DEFINE([HAVE_SQLITE3], [1], [libsqlite3]) AC_DEFINE([HAVE_SQLITE3_H], [1], [sqlite3.h]) ]) + + AC_MSG_CHECKING(for locks in mod_webdav) + AC_ARG_WITH(webdav-locks, AC_HELP_STRING([--with-webdav-locks],[locks in mod_webdav]), + [WITH_WEBDAV_LOCKS=$withval],[WITH_WEBDAV_LOCKS=no]) + AC_MSG_RESULT([$WITH_WEBDAV_LOCKS]) + + if test "$WITH_WEBDAV_LOCKS" != "no"; then + AC_CHECK_LIB(uuid, uuid_unparse, [ + AC_CHECK_HEADERS([uuid/uuid.h],[ + UUID_LIBS=-luuid + AC_DEFINE([HAVE_UUID], [1], [libuuid]) + AC_DEFINE([HAVE_UUID_H], [1], [uuid/uuid.h is available]) + ]) + ]) + + fi fi +AC_SUBST(UUID_LIBS) dnl Check for gdbm AC_MSG_CHECKING(for gdbm) @@ -625,6 +642,14 @@ else disable_feature="$disable_feature $features" fi +features="webdav-locks" +if test "x$UUID_LIBS" \!= x; then + enable_feature="$enable_feature $features" +else + disable_feature="$disable_feature $features" +fi + + ## output $ECHO diff --git a/cygwin/Makefile.in b/cygwin/Makefile.in index ae8bd9a..ba0c88c 100644 --- a/cygwin/Makefile.in +++ b/cygwin/Makefile.in @@ -133,6 +133,7 @@ SQLITE_LIBS = @SQLITE_LIBS@ SSL_LIB = @SSL_LIB@ STRIP = @STRIP@ U = @U@ +UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CFLAGS = @XML_CFLAGS@ XML_LIBS = @XML_LIBS@ diff --git a/debian/changelog b/debian/changelog index 32171f6..1424460 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +lighttpd (1.4.13-1) unstable; urgency=low + + * New upstream release + * Compiled with --with-webdav-locks + + -- Krzysztof Krzyzaniak (eloy) <eloy@debian.org> Tue, 10 Oct 2006 10:26:54 +0200 + lighttpd (1.4.13~r1385-1) unstable; urgency=low * New upstream release diff --git a/debian/rules b/debian/rules index 3e1a03d..157800c 100755 --- a/debian/rules +++ b/debian/rules @@ -9,7 +9,7 @@ include /usr/share/dpatch/dpatch.make DEB_CONFIGURE_EXTRA_FLAGS += --libdir=/usr/lib/lighttpd \ --with-openssl --with-pcre --with-bz2 --with-ldap \ --with-mysql --with-memcache --with-lua=lua5.1\ - --with-gdbm --with-attr + --with-gdbm --with-attr --with-webdav-locks configure/lighttpd:: -mkdir debian/conf-enabled diff --git a/doc/Makefile.am b/doc/Makefile.am index eeaae74..792ff22 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -35,7 +35,8 @@ trigger_b4_dl.txt \ webdav.txt \ expire.txt \ dirlisting.txt \ -evhost.txt +evhost.txt \ +magnet.txt HTMLDOCS=accesslog.html \ authentication.html \ @@ -71,7 +72,8 @@ HTMLDOCS=accesslog.html \ webdav.html \ expire.html \ dirlisting.html \ - evhost.html + evhost.html \ + magnet.html EXTRA_DIST=lighttpd.conf lighttpd.user \ rc.lighttpd rc.lighttpd.redhat sysconfig.lighttpd \ diff --git a/doc/Makefile.in b/doc/Makefile.in index 4391fa2..e177fed 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -137,6 +137,7 @@ SQLITE_LIBS = @SQLITE_LIBS@ SSL_LIB = @SSL_LIB@ STRIP = @STRIP@ U = @U@ +UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CFLAGS = @XML_CFLAGS@ XML_LIBS = @XML_LIBS@ @@ -224,7 +225,8 @@ trigger_b4_dl.txt \ webdav.txt \ expire.txt \ dirlisting.txt \ -evhost.txt +evhost.txt \ +magnet.txt HTMLDOCS = accesslog.html \ authentication.html \ @@ -260,7 +262,8 @@ HTMLDOCS = accesslog.html \ webdav.html \ expire.html \ dirlisting.html \ - evhost.html + evhost.html \ + magnet.html EXTRA_DIST = lighttpd.conf lighttpd.user \ rc.lighttpd rc.lighttpd.redhat sysconfig.lighttpd \ diff --git a/doc/magnet.txt b/doc/magnet.txt new file mode 100644 index 0000000..9d7697a --- /dev/null +++ b/doc/magnet.txt @@ -0,0 +1,429 @@ +{{{
+#!rst
+==============
+a power-magnet
+==============
+
+------------------
+Module: mod_magnet
+------------------
+
+
+
+.. contents:: Table of Contents
+
+Requirements
+============
+
+:Version: lighttpd 1.4.12 or higher
+:Packages: lua >= 5.1
+
+Overview
+========
+
+mod_magnet is a module to control the request handling in lighty.
+
+.. note::
+
+ Keep in mind that the magnet is executed in the core of lighty. EVERY long-running operation is blocking
+ ALL connections in the server. You are warned. For time-consuming or blocking scripts use mod_fastcgi and friends.
+
+For performance reasons mod_magnet caches the compiled script. For each script-run the script itself is checked for
+freshness and recompile if neccesary.
+
+
+Installation
+============
+
+mod_magnet needs a lighty which is compiled with the lua-support ( --with-lua). Lua 5.1 or higher are required by
+the module. Use "--with-lua=lua5.1" to install on Debian and friends. ::
+
+ server.modules = ( ..., "mod_magnet", ... )
+
+Options
+=======
+
+mod_magnet can attract a request in several stages in the request-handling.
+
+* either at the same level as mod_rewrite, before any parsing of the URL is done
+* or at a later stage, when the doc-root is known and the physical-path is already setup
+
+It depends on the purpose of the script which stage you want to intercept. Usually you want to use
+the 2nd stage where the physical-path which relates to your request is known. At this level you
+can run checks against lighty.env["physical.path"].
+
+::
+
+ magnet.attract-raw-url-to = ( ... )
+ magnet.attract-physical-path-to = ( ... )
+
+You can define multiple scripts when separated by a semicolon. The scripts are executed in the specified
+order. If one of them a returning a status-code, the following scripts will not be executed.
+
+Tables
+======
+
+Most of the interaction between between mod_magnet and lighty is done through tables. Tables in lua are hashes (Perl), dictionaries (Java), arrays (PHP), ...
+
+Request-Environment
+-------------------
+
+Lighttpd has its internal variables which are exported as read/write to the magnet.
+
+If "http://example.org/search.php?q=lighty" is requested this results in a request like ::
+
+ GET /search.php?q=lighty HTTP/1.1
+ Host: example.org
+
+When you are using ``attract-raw-url-to`` you can access the following variables:
+
+* parts of the request-line
+
+ * lighty.env["request.uri"] = "/search.php?q=lighty"
+
+* HTTP request-headers
+
+ * lighty.request["Host"] = "example.org"
+
+Later in the request-handling, the URL is splitted, cleaned up and turned into a physical path name:
+
+* parts of the URI
+
+ * lighty.env["uri.path"] = "/search.php"
+ * lighty.env["uri.path-raw"] = "/search.php"
+ * lighty.env["uri.scheme"] = "http"
+ * lighty.env["uri.authority"] = "example.org"
+ * lighty.env["uri.query"] = "q=lighty"
+
+* filenames, pathnames
+
+ * lighty.env["physical.path"] = "/my-docroot/search.php"
+ * lighty.env["physical.rel-path"] = "/search.php"
+ * lighty.env["physical.doc-root"] = "/my-docroot"
+
+All of them are readable, not all of the are writable (or don't have an effect if you write to them).
+
+As a start, you might want to use those variables for writing: ::
+
+ -- 1. simple rewriting is done via the request.uri
+ lighty.env["request.uri"] = ...
+ return lighty.RESTART_REQUEST
+
+ -- 2. changing the physical-path
+ lighty.env["physical.path"] = ...
+
+ -- 3. changing the query-string
+ lighty.env["uri.query"] = ...
+
+Response Headers
+----------------
+
+If you want to set a response header for your request, you can add a field to the lighty.header[] table: ::
+
+ lighty.header["Content-Type"] = "text/html"
+
+Sending Content
+===============
+
+You can generate your own content and send it out to the clients. ::
+
+ lighty.content = { "<pre>", { filename = "/etc/passwd" }, "</pre>" }
+ lighty.header["Content-Type"] = "text/html"
+
+ return 200
+
+The lighty.content[] table is executed when the script is finished. The elements of the array are processed left to right and the elements can either be a string or a table. Strings are included AS IS into the output of the request.
+
+* Strings
+
+ * are included as is
+
+* Tables
+
+ * filename = "<absolute-path>" is required
+ * offset = <number> [default: 0]
+ * length = <number> [default: size of the file - offset]
+
+Internally lighty will use the sendfile() call to send out the static files at full speed.
+
+Status Codes
+============
+
+You might have seen it already in other examples: In case you are handling the request completly in the magnet you
+can return your own status-codes. Examples are: Redirected, Input Validation, ... ::
+
+ if (lighty.env["uri.scheme"] == "http") then
+ lighty.header["Location"] = "https://" .. lighty.env["uri.authority"] .. lighty.env["request.uri"]
+ return 302
+ end
+
+You every number above and equal to 100 is taken as final status code and finishes the request. No other modules are
+executed after this return.
+
+A special return-code is lighty.RESTART_REQUEST (currently equal to 99) which is usually used in combination with
+changing the request.uri in a rewrite. It restarts the splitting of the request-uri again.
+
+If you return nothing (or nil) the request-handling just continues.
+
+Debugging
+=========
+
+To easy debugging we overloaded the print()-function in lua and redirect the output of print() to the error-log. ::
+
+ print("Host: " .. lighty.request["Host"])
+ print("Request-URI: " .. lighty.env["request.uri"])
+
+
+Examples
+========
+
+Sending text-files as HTML
+--------------------------
+
+This is a bit simplistic, but it illustrates the idea: Take a text-file and cover it in a <pre> tag.
+
+Config-file ::
+
+ magnet.attract-physical-path-to = server.docroot + "/readme.lua"
+
+readme.lua ::
+
+ lighty.content = { "<pre>", { filename = "/README" }, "</pre>" }
+ lighty.header["Content-Type"] = "text/html"
+
+ return 200
+
+Maintainance pages
+------------------
+
+Your side might be on maintainance from time to time. Instead of shutting down the server confusing all
+users, you can just send a maintainance page.
+
+Config-file ::
+
+ magnet.attract-physical-path-to = server.docroot + "/maintainance.lua"
+
+maintainance.lua ::
+
+ require "lfs"
+
+ if (nil == lfs.attributes(lighty.env["physical.doc-root"] .. "/maintainance.html")) then
+ lighty.content = ( lighty.env["physical.doc-root"] .. "/maintainance.html" )
+
+ lighty.header["Content-Type"] = "text/html"
+
+ return 200
+ end
+
+mod_flv_streaming
+-----------------
+
+Config-file ::
+
+ magnet.attract-physical-path-to = server.docroot + "/flv-streaming.lua"
+
+flv-streaming.lua::
+
+ if (lighty.env["uri.query"]) then
+ -- split the query-string
+ get = {}
+ for k, v in string.gmatch(lighty.env["uri.query"], "(%w+)=(%w+)") do
+ get[k] = v
+ end
+
+ if (get["start"]) then
+ -- missing: check if start is numeric and positive
+
+ -- send te FLV header + a seek into the file
+ lighty.content = { "FLV\x1\x1\0\0\0\x9\0\0\0\x9",
+ { filename = lighty.env["physical.path"], offset = get["start"] } }
+ lighty.header["Content-Type"] = "video/x-flv"
+
+ return 200
+ end
+ end
+
+
+selecting a random file from a directory
+----------------------------------------
+
+Say, you want to send a random file (ad-content) from a directory.
+
+To simplify the code and to improve the performance we define:
+
+* all images have the same format (e.g. image/png)
+* all images use increasing numbers starting from 1
+* a special index-file names the highest number
+
+Config ::
+
+ server.modules += ( "mod_magnet" )
+ magnet.attract-physical-path-to = "random.lua"
+
+random.lua ::
+
+ dir = lighty.env["physical.path"]
+
+ f = assert(io.open(dir .. "/index", "r"))
+ maxndx = f:read("*all")
+ f:close()
+
+ ndx = math.random(maxndx)
+
+ lighty.content = { { filename = dir .. "/" .. ndx }}
+ lighty.header["Content-Type"] = "image/png"
+
+ return 200
+
+denying illegal character sequences in the URL
+----------------------------------------------
+
+Instead of implementing mod_security, you might just want to apply filters on the content
+and deny special sequences that look like SQL injection.
+
+A common injection is using UNION to extend a query with another SELECT query.
+
+::
+
+ if (string.find(lighty.env["request.uri"], "UNION%s")) then
+ return 400
+ end
+
+Traffic Quotas
+--------------
+
+If you only allow your virtual hosts a certain amount for traffic each month and want to
+disable them if the traffic is reached, perhaps this helps: ::
+
+ host_blacklist = { ["www.example.org"] = 0 }
+
+ if (host_blacklist[lighty.request["Host"]]) then
+ return 404
+ end
+
+Just add the hosts you want to blacklist into the blacklist table in the shown way.
+
+Complex rewrites
+----------------
+
+If you want to implement caching on your document-root and only want to regenerate
+content if the requested file doesn't exist, you can attract the physical.path: ::
+
+ magnet.attract-physical-path-to = ( server.document-root + "/rewrite.lua" )
+
+rewrite.lua ::
+
+ require "lfs"
+
+ attr = lfs.attributes(lighty.env["physical.path"])
+
+ if (not attr) then
+ -- we couldn't stat() the file for some reason
+ -- let the backend generate it
+
+ lighty.env["uri.path"] = "/dispatch.fcgi"
+ lighty.env["physical.rel-path"] = lighty.env["uri.path"]
+ lighty.env["physical.path"] = lighty.env["physical.doc-root"] .. lighty.env["physical.rel-path"]
+ fi
+
+luafilesystem
++++++++++++++
+
+We are requiring the lua-module 'lfs' (http://www.keplerproject.org/luafilesystem/).
+
+I had to compile lfs myself for lua-5.1 which required a minor patch as compat-5.1 is not needed::
+
+ $ wget http://luaforge.net/frs/download.php/1487/luafilesystem-1.2.tar.gz
+ $ wget http://www.lighttpd.net/download/luafilesystem-1.2-lua51.diff
+ $ gzip -cd luafilesystem-1.2.tar.gz | tar xf -
+ $ cd luafilesystem-1.2
+ $ patch -ls -p1 < ../luafilesystem-1.2-lua51.diff
+ $ make install
+
+It will install lfs.so into /usr/lib/lua/5.1/ which is where lua expects the extensions on my system.
+
+SuSE and Gentoo are known to have their own lfs packages and don't require a compile.
+
+Usertracking
+------------
+
+... or how to store data globally in the script-context:
+
+Each script has its own script-context. When the script is started it only contains the lua-functions
+and the special lighty.* name-space. If you want to save data between script runs, you can use the global-script
+context:
+
+::
+
+ if (nil == _G["usertrack"]) then
+ _G["usertrack"] = {}
+ end
+ if (nil == _G["usertrack"][lighty.request["Cookie"]]) then
+ _G["usertrack"][lighty.request["Cookie"]]
+ else
+ _G["usertrack"][lighty.request["Cookie"]] = _G["usertrack"][lighty.request["Cookie"]] + 1
+ end
+
+ print _G["usertrack"][lighty.request["Cookie"]]
+
+The global-context is per script. If you update the script without restarting the server, the context will still be maintained.
+
+Counters
+--------
+
+mod_status support a global statistics page and mod_magnet allows to add and update values in the status page:
+
+Config ::
+
+ status.statistics-url = "/server-counters"
+ magnet.attract-raw-url-to = server.docroot + "/counter.lua"
+
+counter.lua ::
+
+ lighty.status["core.connections"] = lighty.status["core.connections"] + 1
+
+Result::
+
+ core.connections: 7
+ fastcgi.backend.php-foo.0.connected: 0
+ fastcgi.backend.php-foo.0.died: 0
+ fastcgi.backend.php-foo.0.disabled: 0
+ fastcgi.backend.php-foo.0.load: 0
+ fastcgi.backend.php-foo.0.overloaded: 0
+ fastcgi.backend.php-foo.1.connected: 0
+ fastcgi.backend.php-foo.1.died: 0
+ fastcgi.backend.php-foo.1.disabled: 0
+ fastcgi.backend.php-foo.1.load: 0
+ fastcgi.backend.php-foo.1.overloaded: 0
+ fastcgi.backend.php-foo.load: 0
+
+Porting mod_cml scripts
+-----------------------
+
+mod_cml got replaced by mod_magnet.
+
+A CACHE_HIT in mod_cml::
+
+ output_include = { "file1", "file2" }
+
+ return CACHE_HIT
+
+becomes::
+
+ content = { { filename = "/path/to/file1" }, { filename = "/path/to/file2"} }
+
+ return 200
+
+while a CACHE_MISS like (CML) ::
+
+ trigger_handler = "/index.php"
+
+ return CACHE_MISS
+
+becomes (magnet) ::
+
+ lighty.env["request.uri"] = "/index.php"
+
+ return lighty.RESTART_REQUEST
+
+}}}
\ No newline at end of file diff --git a/openwrt/Makefile.in b/openwrt/Makefile.in index 31730c7..2fba912 100644 --- a/openwrt/Makefile.in +++ b/openwrt/Makefile.in @@ -133,6 +133,7 @@ SQLITE_LIBS = @SQLITE_LIBS@ SSL_LIB = @SSL_LIB@ STRIP = @STRIP@ U = @U@ +UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CFLAGS = @XML_CFLAGS@ XML_LIBS = @XML_LIBS@ diff --git a/src/Makefile.am b/src/Makefile.am index 6eedd8a..49b3bfd 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -82,9 +82,9 @@ mod_evasive_la_LIBADD = $(common_libadd) lib_LTLIBRARIES += mod_webdav.la mod_webdav_la_SOURCES = mod_webdav.c -mod_webdav_la_CFLAGS = $(AM_CFLAGS) $(XML_CFLAGS) $(SQLITE_CFLAGS) +mod_webdav_la_CFLAGS = $(AM_CFLAGS) $(XML_CFLAGS) $(SQLITE_CFLAGS) mod_webdav_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined -mod_webdav_la_LIBADD = $(common_libadd) $(XML_LIBS) $(SQLITE_LIBS) +mod_webdav_la_LIBADD = $(common_libadd) $(XML_LIBS) $(SQLITE_LIBS) $(UUID_LIBS) lib_LTLIBRARIES += mod_magnet.la mod_magnet_la_SOURCES = mod_magnet.c mod_magnet_cache.c diff --git a/src/Makefile.in b/src/Makefile.in index 0313044..e3ea4c1 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -221,7 +221,8 @@ mod_usertrack_la_DEPENDENCIES = $(am__DEPENDENCIES_2) am_mod_usertrack_la_OBJECTS = mod_usertrack.lo mod_usertrack_la_OBJECTS = $(am_mod_usertrack_la_OBJECTS) mod_webdav_la_DEPENDENCIES = $(am__DEPENDENCIES_2) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) am_mod_webdav_la_OBJECTS = mod_webdav_la-mod_webdav.lo mod_webdav_la_OBJECTS = $(am_mod_webdav_la_OBJECTS) binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) @@ -416,6 +417,7 @@ SQLITE_LIBS = @SQLITE_LIBS@ SSL_LIB = @SSL_LIB@ STRIP = @STRIP@ U = @U@ +UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CFLAGS = @XML_CFLAGS@ XML_LIBS = @XML_LIBS@ @@ -520,9 +522,9 @@ mod_evasive_la_SOURCES = mod_evasive.c mod_evasive_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined mod_evasive_la_LIBADD = $(common_libadd) mod_webdav_la_SOURCES = mod_webdav.c -mod_webdav_la_CFLAGS = $(AM_CFLAGS) $(XML_CFLAGS) $(SQLITE_CFLAGS) +mod_webdav_la_CFLAGS = $(AM_CFLAGS) $(XML_CFLAGS) $(SQLITE_CFLAGS) mod_webdav_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined -mod_webdav_la_LIBADD = $(common_libadd) $(XML_LIBS) $(SQLITE_LIBS) +mod_webdav_la_LIBADD = $(common_libadd) $(XML_LIBS) $(SQLITE_LIBS) $(UUID_LIBS) mod_magnet_la_SOURCES = mod_magnet.c mod_magnet_cache.c mod_magnet_la_CFLAGS = $(AM_CFLAGS) $(LUA_CFLAGS) mod_magnet_la_LDFLAGS = -module -export-dynamic -avoid-version -no-undefined diff --git a/src/network_linux_sendfile.c b/src/network_linux_sendfile.c index d49263d..6586efb 100644 --- a/src/network_linux_sendfile.c +++ b/src/network_linux_sendfile.c @@ -175,6 +175,7 @@ int network_write_chunkqueue_linuxsendfile(server *srv, connection *con, int fd, } if (r == 0) { + int oerrno = errno; /* We got an event to write but we wrote nothing * * - the file shrinked -> error @@ -187,9 +188,12 @@ int network_write_chunkqueue_linuxsendfile(server *srv, connection *con, int fd, if (offset > sce->st.st_size) { /* file shrinked, close the connection */ + errno = oerrno; + return -1; } + errno = oerrno; return -2; } diff --git a/src/plugin.c b/src/plugin.c index 3e8147b..faf5520 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -161,7 +161,7 @@ int plugins_load(server *srv) { } #else - if (NULL == (p->lib = dlopen(srv->tmp_buf->ptr, RTLD_LAZY))) { + if (NULL == (p->lib = dlopen(srv->tmp_buf->ptr, RTLD_NOW|RTLD_GLOBAL))) { log_error_write(srv, __FILE__, __LINE__, "sbs", "dlopen() failed for:", srv->tmp_buf, dlerror()); diff --git a/tests/Makefile.in b/tests/Makefile.in index 04e807a..4ba1431 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -166,6 +166,7 @@ SQLITE_LIBS = @SQLITE_LIBS@ SSL_LIB = @SSL_LIB@ STRIP = @STRIP@ U = @U@ +UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CFLAGS = @XML_CFLAGS@ XML_LIBS = @XML_LIBS@ diff --git a/tests/docroot/123/Makefile.in b/tests/docroot/123/Makefile.in index f31f41c..c187355 100644 --- a/tests/docroot/123/Makefile.in +++ b/tests/docroot/123/Makefile.in @@ -132,6 +132,7 @@ SQLITE_LIBS = @SQLITE_LIBS@ SSL_LIB = @SSL_LIB@ STRIP = @STRIP@ U = @U@ +UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CFLAGS = @XML_CFLAGS@ XML_LIBS = @XML_LIBS@ diff --git a/tests/docroot/Makefile.in b/tests/docroot/Makefile.in index 3cf5960..91435f3 100644 --- a/tests/docroot/Makefile.in +++ b/tests/docroot/Makefile.in @@ -141,6 +141,7 @@ SQLITE_LIBS = @SQLITE_LIBS@ SSL_LIB = @SSL_LIB@ STRIP = @STRIP@ U = @U@ +UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CFLAGS = @XML_CFLAGS@ XML_LIBS = @XML_LIBS@ diff --git a/tests/docroot/www/Makefile.in b/tests/docroot/www/Makefile.in index d0e70e4..89399a0 100644 --- a/tests/docroot/www/Makefile.in +++ b/tests/docroot/www/Makefile.in @@ -141,6 +141,7 @@ SQLITE_LIBS = @SQLITE_LIBS@ SSL_LIB = @SSL_LIB@ STRIP = @STRIP@ U = @U@ +UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CFLAGS = @XML_CFLAGS@ XML_LIBS = @XML_LIBS@ diff --git a/tests/docroot/www/expire/Makefile.in b/tests/docroot/www/expire/Makefile.in index d760078..38c6b66 100644 --- a/tests/docroot/www/expire/Makefile.in +++ b/tests/docroot/www/expire/Makefile.in @@ -132,6 +132,7 @@ SQLITE_LIBS = @SQLITE_LIBS@ SSL_LIB = @SSL_LIB@ STRIP = @STRIP@ U = @U@ +UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CFLAGS = @XML_CFLAGS@ XML_LIBS = @XML_LIBS@ diff --git a/tests/docroot/www/go/Makefile.in b/tests/docroot/www/go/Makefile.in index 32e94e2..b5c5d62 100644 --- a/tests/docroot/www/go/Makefile.in +++ b/tests/docroot/www/go/Makefile.in @@ -132,6 +132,7 @@ SQLITE_LIBS = @SQLITE_LIBS@ SSL_LIB = @SSL_LIB@ STRIP = @STRIP@ U = @U@ +UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CFLAGS = @XML_CFLAGS@ XML_LIBS = @XML_LIBS@ diff --git a/tests/docroot/www/indexfile/Makefile.in b/tests/docroot/www/indexfile/Makefile.in index 349ec68..5285d2d 100644 --- a/tests/docroot/www/indexfile/Makefile.in +++ b/tests/docroot/www/indexfile/Makefile.in @@ -132,6 +132,7 @@ SQLITE_LIBS = @SQLITE_LIBS@ SSL_LIB = @SSL_LIB@ STRIP = @STRIP@ U = @U@ +UUID_LIBS = @UUID_LIBS@ VERSION = @VERSION@ XML_CFLAGS = @XML_CFLAGS@ XML_LIBS = @XML_LIBS@ |