[apache2] 01/05: Imported Upstream version 2.4.27

Stefan Fritsch sf at moszumanska.debian.org
Sun Jul 16 09:06:52 UTC 2017


This is an automated email from the git hooks/post-receive script.

sf pushed a commit to branch master
in repository apache2.

commit f79713302c3a3ee90b41f9e37f9ed83325553875
Author: Stefan Fritsch <sf at sfritsch.de>
Date:   Sun Jul 16 10:14:12 2017 +0200

    Imported Upstream version 2.4.27
---
 CHANGES                             |  73 ++++-
 build/rpm/httpd.spec.in             |   1 +
 configure                           | 550 +++---------------------------------
 docs/manual/howto/http2.html.fr     |   8 +-
 docs/manual/mod/core.html.en        |  11 +-
 docs/manual/mod/core.html.fr        |   7 +-
 docs/manual/mod/mod_rewrite.html.fr |   2 -
 docs/manual/style/version.ent       |   2 +-
 httpd.spec                          |   3 +-
 include/ap_release.h                |   2 +-
 modules/aaa/mod_auth_digest.c       |   6 +-
 modules/aaa/mod_authnz_ldap.c       |   4 +
 modules/cache/mod_cache_socache.c   |  21 +-
 modules/http/http_protocol.c        |   6 +-
 modules/http2/h2_conn.c             |  21 +-
 modules/http2/h2_conn.h             |   3 +-
 modules/http2/h2_mplx.c             |  58 ++--
 modules/http2/h2_mplx.h             |   4 +-
 modules/http2/h2_session.c          |   7 +-
 modules/http2/h2_stream.c           |  14 +-
 modules/http2/h2_switch.c           |   8 +
 modules/http2/h2_util.c             | 425 +++++++++++++++++++++++-----
 modules/http2/h2_util.h             |  68 ++++-
 modules/http2/h2_version.h          |   2 +-
 modules/http2/h2_workers.c          |   7 +-
 modules/http2/mod_http2.c           |  12 +
 modules/lua/README                  |   3 +
 modules/lua/config.m4               |  38 +--
 modules/lua/lua_apr.c               |   4 +
 modules/lua/lua_config.c            |   4 +-
 modules/lua/lua_request.c           |  20 +-
 modules/lua/mod_lua.c               |   6 +-
 modules/lua/mod_lua.h               |  18 +-
 modules/mappers/mod_negotiation.c   |  11 +-
 modules/proxy/mod_proxy_fcgi.c      |  32 ---
 server/protocol.c                   |  15 +-
 server/request.c                    |   6 +-
 support/htdigest.c                  |   2 +-
 support/htpasswd.c                  |   2 +-
 39 files changed, 710 insertions(+), 776 deletions(-)

diff --git a/CHANGES b/CHANGES
index 95eceee..9d560e4 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,7 +1,66 @@
                                                          -*- coding: utf-8 -*-
 
+Changes with Apache 2.4.27
+
+  *) COMPATIBILITY: mod_lua: Remove the undocumented exported 'apr_table'
+     global variable when using Lua 5.2 or later. This was exported as a
+     side effect from luaL_register, which is no longer supported as of
+     Lua 5.2 which deprecates pollution of the global namespace.
+     [Rainer Jung]
+
+  *) COMPATIBILITY: mod_http2: Disable and give warning when using Prefork.
+     The server will continue to run, but HTTP/2 will no longer be negotiated.
+     [Stefan Eissing]
+
+  *) COMPATIBILITY: mod_proxy_fcgi: Revert to 2.4.20 FCGI behavior for the
+     default ProxyFCGIBackendType, fixing a regression with PHP-FPM. PR 61202.
+     [Jacob Champion, Jim Jagielski]
+
+  *) mod_lua: Improve compatibility with Lua 5.1, 5.2 and 5.3.
+     PR58188, PR60831, PR61245. [Rainer Jung]
+  
+  *) mod_http2: Simplify ready queue, less memory and better performance. Update
+     mod_http2 version to 1.10.7. [Stefan Eissing]
+  
+  *) Allow single-char field names inadvertantly disallowed in 2.4.25.
+     PR 61220. [Yann Ylavic]
+
+  *) htpasswd / htdigest: Do not apply the strict permissions of the temporary
+     passwd file to a possibly existing passwd file. PR 61240. [Ruediger Pluem]
+
+  *) core: Avoid duplicate HEAD in Allow header.
+     This is a regression in 2.4.24 (unreleased), 2.4.25 and 2.4.26.
+     PR 61207. [Christophe Jaillet]
+
 Changes with Apache 2.4.26
 
+  *) SECURITY: CVE-2017-7679 (cve.mitre.org)
+     mod_mime can read one byte past the end of a buffer when sending a
+     malicious Content-Type response header.  [Yann Ylavic]
+
+  *) SECURITY: CVE-2017-7668 (cve.mitre.org)
+     The HTTP strict parsing changes added in 2.2.32 and 2.4.24 introduced a
+     bug in token list parsing, which allows ap_find_token() to search past
+     the end of its input string. By maliciously crafting a sequence of
+     request headers, an attacker may be able to cause a segmentation fault,
+     or to force ap_find_token() to return an incorrect value.
+     [Jacob Champion]
+
+  *) SECURITY: CVE-2017-7659 (cve.mitre.org)
+     A maliciously constructed HTTP/2 request could cause mod_http2 to
+     dereference a NULL pointer and crash the server process.
+
+  *) SECURITY: CVE-2017-3169 (cve.mitre.org)
+     mod_ssl may dereference a NULL pointer when third-party modules call
+     ap_hook_process_connection() during an HTTP request to an HTTPS port.
+     [Yann Ylavic]
+
+  *) SECURITY: CVE-2017-3167 (cve.mitre.org)
+     Use of the ap_get_basic_auth_pw() by third-party modules outside of the
+     authentication phase may lead to authentication requirements being
+     bypassed.
+     [Emmanuel Dreyfus <manu netbsd.org>, Jacob Champion, Eric Covener]
+
   *) HTTP/2 support no longer tagged as "experimental" but is instead considered
      fully production ready.
 
@@ -9,8 +68,6 @@ Changes with Apache 2.4.26
      the session in continuous check for state changes that never happen. 
      [Stefan Eissing]
 
-  *) mod_mime: Fix error checking for quoted pairs.  [Yann Ylavic]
-
   *) mod_proxy_wstunnel: Add "upgrade" parameter to allow upgrade to other
      protocols.  [Jean-Frederic Clere]
 
@@ -18,10 +75,6 @@ Changes with Apache 2.4.26
      a possible crash if a signal is caught during (graceful) restart.
      PR 60487.  [Yann Ylavic]
 
-  *) core: Deprecate ap_get_basic_auth_pw() and add
-     ap_get_basic_auth_components().
-     [Emmanuel Dreyfus <manu netbsd.org>, Jacob Champion, Eric Covener]
-
   *) mod_rewrite: When a substitution is a fully qualified URL, and the 
      scheme/host/port matches the current virtual host, stop interpreting the 
      path component as a local path just because the first component of the 
@@ -38,9 +91,6 @@ Changes with Apache 2.4.26
   *) core: EBCDIC fixes for interim responses with additional headers.
      [Eric Covener]
 
-  *) mod_ssl: Consistently pass the expected bio_filter_in_ctx_t
-     to ssl_io_filter_error(). [Yann Ylavic]
-
   *) mod_env: when processing a 'SetEnv' directive, warn if the environment
      variable name includes a '='. It is likely a configuration error.
      PR 60249 [Christophe Jaillet]
@@ -122,11 +172,6 @@ Changes with Apache 2.4.26
      variables just before invoking the FastCGI. [Eric Covener,
      Jacob Champion]
 
-  *) mod_proxy: Allow the per-request environment variable "no-proxy" to
-     be used as an alternative to ProxyPass /path !. This is primarily
-     to set exceptions for ProxyPass specified in <Location> context.
-    Use SetEnvIf, not SetEnv. [Eric Covener]
-
   *) mod_proxy_fcgi: Return to 2.4.20-and-earlier behavior of leaving
      a "proxy:fcgi://" prefix in the SCRIPT_FILENAME environment variable by
      default.  Add ProxyFCGIBackendType to allow the type of backend to be
diff --git a/build/rpm/httpd.spec.in b/build/rpm/httpd.spec.in
index 271fc5c..540ad09 100644
--- a/build/rpm/httpd.spec.in
+++ b/build/rpm/httpd.spec.in
@@ -383,6 +383,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/httpd/modules/mod_proxy_http.so
 %{_libdir}/httpd/modules/mod_proxy_scgi.so
 %{_libdir}/httpd/modules/mod_proxy_wstunnel.so
+%{_libdir}/httpd/modules/mod_proxy_hcheck.so
 %{_libdir}/httpd/modules/mod_proxy.so
 %{_libdir}/httpd/modules/mod_ratelimit.so
 %{_libdir}/httpd/modules/mod_reflector.so
diff --git a/configure b/configure
index fa34cbd..3362234 100755
--- a/configure
+++ b/configure
@@ -20108,14 +20108,10 @@ $as_echo_n "checking for lua.h in ${x}/include/lua-5.3... " >&6; }
     if test -f ${x}/include/lua-5.3/lua.h; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-
         save_CFLAGS=$CFLAGS
         save_LDFLAGS=$LDFLAGS
-        save_LIBS=$LIBS
-
         CFLAGS="$CFLAGS"
         LDFLAGS="-L${x}/lib/lua-5.3 $LDFLAGS $lib_m"
-
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for luaL_newstate in -llua-5.3" >&5
 $as_echo_n "checking for luaL_newstate in -llua-5.3... " >&6; }
 if ${ac_cv_lib_lua_5_3_luaL_newstate+:} false; then :
@@ -20154,40 +20150,8 @@ fi
 $as_echo "$ac_cv_lib_lua_5_3_luaL_newstate" >&6; }
 if test "x$ac_cv_lib_lua_5_3_luaL_newstate" = xyes; then :
 
-                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for luaL_register in -llua-5.3" >&5
-$as_echo_n "checking for luaL_register in -llua-5.3... " >&6; }
-            CFLAGS="$CFLAGS -I${x}/include/lua-5.3"
-            LIBS="-llua-5.3"
-            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-                    #define LUA_COMPAT_ALL
-                    #define LUA_COMPAT_5_2
-                    #define LUA_COMPAT_5_1
-                    #define LUA_COMPAT_MODULE
-
-                    #include <lua.h>
-                    #include <lauxlib.h>
-
-int
-main ()
-{
-
-                    /* This isn't a valid call, but we're testing linkability */
-                    luaL_register(NULL, NULL, NULL);
-
-  ;
-  return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-                LUA_LIBS="-L${x}/lib/lua-5.3 -llua-5.3 $lib_m"
-                if test "x$ap_platform_runtime_link_flag" != "x"; then
+            LUA_LIBS="-L${x}/lib/lua-5.3 -llua-5.3 $lib_m"
+            if test "x$ap_platform_runtime_link_flag" != "x"; then
 
   if test "x$LUA_LIBS" = "x"; then
     test "x$silent" != "xyes" && echo "  setting LUA_LIBS to \"$ap_platform_runtime_link_flag${x}/lib/lua-5.3\""
@@ -20209,24 +20173,13 @@ $as_echo "yes" >&6; }
     done
   fi
 
-                fi
-                LUA_CFLAGS="-I${x}/include/lua-5.3"
-
-else
-
-                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
+            fi
+            LUA_CFLAGS="-I${x}/include/lua-5.3"
 
 fi
 
-
         CFLAGS=$save_CFLAGS
         LDFLAGS=$save_LDFLAGS
-        LIBS=$save_LIBS
 
         if test -n "${LUA_LIBS}"; then
             break
@@ -20241,14 +20194,10 @@ $as_echo_n "checking for lua.h in ${x}/include/lua5.3... " >&6; }
     if test -f ${x}/include/lua5.3/lua.h; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-
         save_CFLAGS=$CFLAGS
         save_LDFLAGS=$LDFLAGS
-        save_LIBS=$LIBS
-
         CFLAGS="$CFLAGS"
         LDFLAGS="-L${x}/lib $LDFLAGS $lib_m"
-
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for luaL_newstate in -llua5.3" >&5
 $as_echo_n "checking for luaL_newstate in -llua5.3... " >&6; }
 if ${ac_cv_lib_lua5_3_luaL_newstate+:} false; then :
@@ -20287,40 +20236,8 @@ fi
 $as_echo "$ac_cv_lib_lua5_3_luaL_newstate" >&6; }
 if test "x$ac_cv_lib_lua5_3_luaL_newstate" = xyes; then :
 
-                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for luaL_register in -llua5.3" >&5
-$as_echo_n "checking for luaL_register in -llua5.3... " >&6; }
-            CFLAGS="$CFLAGS -I${x}/include/lua5.3"
-            LIBS="-llua5.3"
-            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-                    #define LUA_COMPAT_ALL
-                    #define LUA_COMPAT_5_2
-                    #define LUA_COMPAT_5_1
-                    #define LUA_COMPAT_MODULE
-
-                    #include <lua.h>
-                    #include <lauxlib.h>
-
-int
-main ()
-{
-
-                    /* This isn't a valid call, but we're testing linkability */
-                    luaL_register(NULL, NULL, NULL);
-
-  ;
-  return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-                LUA_LIBS="-L${x}/lib -llua5.3 $lib_m"
-                if test "x$ap_platform_runtime_link_flag" != "x"; then
+            LUA_LIBS="-L${x}/lib -llua5.3 $lib_m"
+            if test "x$ap_platform_runtime_link_flag" != "x"; then
 
   if test "x$LUA_LIBS" = "x"; then
     test "x$silent" != "xyes" && echo "  setting LUA_LIBS to \"$ap_platform_runtime_link_flag${x}/lib\""
@@ -20342,24 +20259,13 @@ $as_echo "yes" >&6; }
     done
   fi
 
-                fi
-                LUA_CFLAGS="-I${x}/include/lua5.3"
-
-else
-
-                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
+            fi
+            LUA_CFLAGS="-I${x}/include/lua5.3"
 
 fi
 
-
         CFLAGS=$save_CFLAGS
         LDFLAGS=$save_LDFLAGS
-        LIBS=$save_LIBS
 
         if test -n "${LUA_LIBS}"; then
             break
@@ -20374,14 +20280,10 @@ $as_echo_n "checking for lua.h in ${x}/include/lua53... " >&6; }
     if test -f ${x}/include/lua53/lua.h; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-
         save_CFLAGS=$CFLAGS
         save_LDFLAGS=$LDFLAGS
-        save_LIBS=$LIBS
-
         CFLAGS="$CFLAGS"
         LDFLAGS="-L${x}/lib/lua53 $LDFLAGS $lib_m"
-
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for luaL_newstate in -llua" >&5
 $as_echo_n "checking for luaL_newstate in -llua... " >&6; }
 if ${ac_cv_lib_lua_luaL_newstate+:} false; then :
@@ -20420,40 +20322,8 @@ fi
 $as_echo "$ac_cv_lib_lua_luaL_newstate" >&6; }
 if test "x$ac_cv_lib_lua_luaL_newstate" = xyes; then :
 
-                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for luaL_register in -llua" >&5
-$as_echo_n "checking for luaL_register in -llua... " >&6; }
-            CFLAGS="$CFLAGS -I${x}/include/lua53"
-            LIBS="-llua"
-            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-                    #define LUA_COMPAT_ALL
-                    #define LUA_COMPAT_5_2
-                    #define LUA_COMPAT_5_1
-                    #define LUA_COMPAT_MODULE
-
-                    #include <lua.h>
-                    #include <lauxlib.h>
-
-int
-main ()
-{
-
-                    /* This isn't a valid call, but we're testing linkability */
-                    luaL_register(NULL, NULL, NULL);
-
-  ;
-  return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-                LUA_LIBS="-L${x}/lib/lua53 -llua $lib_m"
-                if test "x$ap_platform_runtime_link_flag" != "x"; then
+            LUA_LIBS="-L${x}/lib/lua53 -llua $lib_m"
+            if test "x$ap_platform_runtime_link_flag" != "x"; then
 
   if test "x$LUA_LIBS" = "x"; then
     test "x$silent" != "xyes" && echo "  setting LUA_LIBS to \"$ap_platform_runtime_link_flag${x}/lib/lua53\""
@@ -20475,24 +20345,13 @@ $as_echo "yes" >&6; }
     done
   fi
 
-                fi
-                LUA_CFLAGS="-I${x}/include/lua53"
-
-else
-
-                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
+            fi
+            LUA_CFLAGS="-I${x}/include/lua53"
 
 fi
 
-
         CFLAGS=$save_CFLAGS
         LDFLAGS=$save_LDFLAGS
-        LIBS=$save_LIBS
 
         if test -n "${LUA_LIBS}"; then
             break
@@ -20508,14 +20367,10 @@ $as_echo_n "checking for lua.h in ${x}/include... " >&6; }
     if test -f ${x}/include/lua.h; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-
         save_CFLAGS=$CFLAGS
         save_LDFLAGS=$LDFLAGS
-        save_LIBS=$LIBS
-
         CFLAGS="$CFLAGS"
         LDFLAGS="-L${x}/lib $LDFLAGS $lib_m"
-
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for luaL_newstate in -llua" >&5
 $as_echo_n "checking for luaL_newstate in -llua... " >&6; }
 if ${ac_cv_lib_lua_luaL_newstate+:} false; then :
@@ -20554,40 +20409,8 @@ fi
 $as_echo "$ac_cv_lib_lua_luaL_newstate" >&6; }
 if test "x$ac_cv_lib_lua_luaL_newstate" = xyes; then :
 
-                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for luaL_register in -llua" >&5
-$as_echo_n "checking for luaL_register in -llua... " >&6; }
-            CFLAGS="$CFLAGS -I${x}/include"
-            LIBS="-llua"
-            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-                    #define LUA_COMPAT_ALL
-                    #define LUA_COMPAT_5_2
-                    #define LUA_COMPAT_5_1
-                    #define LUA_COMPAT_MODULE
-
-                    #include <lua.h>
-                    #include <lauxlib.h>
-
-int
-main ()
-{
-
-                    /* This isn't a valid call, but we're testing linkability */
-                    luaL_register(NULL, NULL, NULL);
-
-  ;
-  return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-                LUA_LIBS="-L${x}/lib -llua $lib_m"
-                if test "x$ap_platform_runtime_link_flag" != "x"; then
+            LUA_LIBS="-L${x}/lib -llua $lib_m"
+            if test "x$ap_platform_runtime_link_flag" != "x"; then
 
   if test "x$LUA_LIBS" = "x"; then
     test "x$silent" != "xyes" && echo "  setting LUA_LIBS to \"$ap_platform_runtime_link_flag${x}/lib\""
@@ -20609,24 +20432,13 @@ $as_echo "yes" >&6; }
     done
   fi
 
-                fi
-                LUA_CFLAGS="-I${x}/include"
-
-else
-
-                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
+            fi
+            LUA_CFLAGS="-I${x}/include"
 
 fi
 
-
         CFLAGS=$save_CFLAGS
         LDFLAGS=$save_LDFLAGS
-        LIBS=$save_LIBS
 
         if test -n "${LUA_LIBS}"; then
             break
@@ -20642,14 +20454,10 @@ $as_echo_n "checking for lua.h in ${x}/include/lua-5.2... " >&6; }
     if test -f ${x}/include/lua-5.2/lua.h; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-
         save_CFLAGS=$CFLAGS
         save_LDFLAGS=$LDFLAGS
-        save_LIBS=$LIBS
-
         CFLAGS="$CFLAGS"
         LDFLAGS="-L${x}/lib/lua-5.2 $LDFLAGS $lib_m"
-
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for luaL_newstate in -llua-5.2" >&5
 $as_echo_n "checking for luaL_newstate in -llua-5.2... " >&6; }
 if ${ac_cv_lib_lua_5_2_luaL_newstate+:} false; then :
@@ -20688,40 +20496,8 @@ fi
 $as_echo "$ac_cv_lib_lua_5_2_luaL_newstate" >&6; }
 if test "x$ac_cv_lib_lua_5_2_luaL_newstate" = xyes; then :
 
-                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for luaL_register in -llua-5.2" >&5
-$as_echo_n "checking for luaL_register in -llua-5.2... " >&6; }
-            CFLAGS="$CFLAGS -I${x}/include/lua-5.2"
-            LIBS="-llua-5.2"
-            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-                    #define LUA_COMPAT_ALL
-                    #define LUA_COMPAT_5_2
-                    #define LUA_COMPAT_5_1
-                    #define LUA_COMPAT_MODULE
-
-                    #include <lua.h>
-                    #include <lauxlib.h>
-
-int
-main ()
-{
-
-                    /* This isn't a valid call, but we're testing linkability */
-                    luaL_register(NULL, NULL, NULL);
-
-  ;
-  return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-                LUA_LIBS="-L${x}/lib/lua-5.2 -llua-5.2 $lib_m"
-                if test "x$ap_platform_runtime_link_flag" != "x"; then
+            LUA_LIBS="-L${x}/lib/lua-5.2 -llua-5.2 $lib_m"
+            if test "x$ap_platform_runtime_link_flag" != "x"; then
 
   if test "x$LUA_LIBS" = "x"; then
     test "x$silent" != "xyes" && echo "  setting LUA_LIBS to \"$ap_platform_runtime_link_flag${x}/lib/lua-5.2\""
@@ -20743,24 +20519,13 @@ $as_echo "yes" >&6; }
     done
   fi
 
-                fi
-                LUA_CFLAGS="-I${x}/include/lua-5.2"
-
-else
-
-                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
+            fi
+            LUA_CFLAGS="-I${x}/include/lua-5.2"
 
 fi
 
-
         CFLAGS=$save_CFLAGS
         LDFLAGS=$save_LDFLAGS
-        LIBS=$save_LIBS
 
         if test -n "${LUA_LIBS}"; then
             break
@@ -20775,14 +20540,10 @@ $as_echo_n "checking for lua.h in ${x}/include/lua5.2... " >&6; }
     if test -f ${x}/include/lua5.2/lua.h; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-
         save_CFLAGS=$CFLAGS
         save_LDFLAGS=$LDFLAGS
-        save_LIBS=$LIBS
-
         CFLAGS="$CFLAGS"
         LDFLAGS="-L${x}/lib $LDFLAGS $lib_m"
-
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for luaL_newstate in -llua5.2" >&5
 $as_echo_n "checking for luaL_newstate in -llua5.2... " >&6; }
 if ${ac_cv_lib_lua5_2_luaL_newstate+:} false; then :
@@ -20821,40 +20582,8 @@ fi
 $as_echo "$ac_cv_lib_lua5_2_luaL_newstate" >&6; }
 if test "x$ac_cv_lib_lua5_2_luaL_newstate" = xyes; then :
 
-                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for luaL_register in -llua5.2" >&5
-$as_echo_n "checking for luaL_register in -llua5.2... " >&6; }
-            CFLAGS="$CFLAGS -I${x}/include/lua5.2"
-            LIBS="-llua5.2"
-            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-                    #define LUA_COMPAT_ALL
-                    #define LUA_COMPAT_5_2
-                    #define LUA_COMPAT_5_1
-                    #define LUA_COMPAT_MODULE
-
-                    #include <lua.h>
-                    #include <lauxlib.h>
-
-int
-main ()
-{
-
-                    /* This isn't a valid call, but we're testing linkability */
-                    luaL_register(NULL, NULL, NULL);
-
-  ;
-  return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-                LUA_LIBS="-L${x}/lib -llua5.2 $lib_m"
-                if test "x$ap_platform_runtime_link_flag" != "x"; then
+            LUA_LIBS="-L${x}/lib -llua5.2 $lib_m"
+            if test "x$ap_platform_runtime_link_flag" != "x"; then
 
   if test "x$LUA_LIBS" = "x"; then
     test "x$silent" != "xyes" && echo "  setting LUA_LIBS to \"$ap_platform_runtime_link_flag${x}/lib\""
@@ -20876,24 +20605,13 @@ $as_echo "yes" >&6; }
     done
   fi
 
-                fi
-                LUA_CFLAGS="-I${x}/include/lua5.2"
-
-else
-
-                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
+            fi
+            LUA_CFLAGS="-I${x}/include/lua5.2"
 
 fi
 
-
         CFLAGS=$save_CFLAGS
         LDFLAGS=$save_LDFLAGS
-        LIBS=$save_LIBS
 
         if test -n "${LUA_LIBS}"; then
             break
@@ -20908,14 +20626,10 @@ $as_echo_n "checking for lua.h in ${x}/include/lua52... " >&6; }
     if test -f ${x}/include/lua52/lua.h; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-
         save_CFLAGS=$CFLAGS
         save_LDFLAGS=$LDFLAGS
-        save_LIBS=$LIBS
-
         CFLAGS="$CFLAGS"
         LDFLAGS="-L${x}/lib/lua52 $LDFLAGS $lib_m"
-
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for luaL_newstate in -llua" >&5
 $as_echo_n "checking for luaL_newstate in -llua... " >&6; }
 if ${ac_cv_lib_lua_luaL_newstate+:} false; then :
@@ -20954,40 +20668,8 @@ fi
 $as_echo "$ac_cv_lib_lua_luaL_newstate" >&6; }
 if test "x$ac_cv_lib_lua_luaL_newstate" = xyes; then :
 
-                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for luaL_register in -llua" >&5
-$as_echo_n "checking for luaL_register in -llua... " >&6; }
-            CFLAGS="$CFLAGS -I${x}/include/lua52"
-            LIBS="-llua"
-            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-                    #define LUA_COMPAT_ALL
-                    #define LUA_COMPAT_5_2
-                    #define LUA_COMPAT_5_1
-                    #define LUA_COMPAT_MODULE
-
-                    #include <lua.h>
-                    #include <lauxlib.h>
-
-int
-main ()
-{
-
-                    /* This isn't a valid call, but we're testing linkability */
-                    luaL_register(NULL, NULL, NULL);
-
-  ;
-  return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-                LUA_LIBS="-L${x}/lib/lua52 -llua $lib_m"
-                if test "x$ap_platform_runtime_link_flag" != "x"; then
+            LUA_LIBS="-L${x}/lib/lua52 -llua $lib_m"
+            if test "x$ap_platform_runtime_link_flag" != "x"; then
 
   if test "x$LUA_LIBS" = "x"; then
     test "x$silent" != "xyes" && echo "  setting LUA_LIBS to \"$ap_platform_runtime_link_flag${x}/lib/lua52\""
@@ -21009,24 +20691,13 @@ $as_echo "yes" >&6; }
     done
   fi
 
-                fi
-                LUA_CFLAGS="-I${x}/include/lua52"
-
-else
-
-                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
+            fi
+            LUA_CFLAGS="-I${x}/include/lua52"
 
 fi
 
-
         CFLAGS=$save_CFLAGS
         LDFLAGS=$save_LDFLAGS
-        LIBS=$save_LIBS
 
         if test -n "${LUA_LIBS}"; then
             break
@@ -21042,14 +20713,10 @@ $as_echo_n "checking for lua.h in ${x}/include/lua-5.1... " >&6; }
     if test -f ${x}/include/lua-5.1/lua.h; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-
         save_CFLAGS=$CFLAGS
         save_LDFLAGS=$LDFLAGS
-        save_LIBS=$LIBS
-
         CFLAGS="$CFLAGS"
         LDFLAGS="-L${x}/lib/lua-5.1 $LDFLAGS $lib_m"
-
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for luaL_newstate in -llua-5.1" >&5
 $as_echo_n "checking for luaL_newstate in -llua-5.1... " >&6; }
 if ${ac_cv_lib_lua_5_1_luaL_newstate+:} false; then :
@@ -21088,40 +20755,8 @@ fi
 $as_echo "$ac_cv_lib_lua_5_1_luaL_newstate" >&6; }
 if test "x$ac_cv_lib_lua_5_1_luaL_newstate" = xyes; then :
 
-                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for luaL_register in -llua-5.1" >&5
-$as_echo_n "checking for luaL_register in -llua-5.1... " >&6; }
-            CFLAGS="$CFLAGS -I${x}/include/lua-5.1"
-            LIBS="-llua-5.1"
-            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-                    #define LUA_COMPAT_ALL
-                    #define LUA_COMPAT_5_2
-                    #define LUA_COMPAT_5_1
-                    #define LUA_COMPAT_MODULE
-
-                    #include <lua.h>
-                    #include <lauxlib.h>
-
-int
-main ()
-{
-
-                    /* This isn't a valid call, but we're testing linkability */
-                    luaL_register(NULL, NULL, NULL);
-
-  ;
-  return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-                LUA_LIBS="-L${x}/lib/lua-5.1 -llua-5.1 $lib_m"
-                if test "x$ap_platform_runtime_link_flag" != "x"; then
+            LUA_LIBS="-L${x}/lib/lua-5.1 -llua-5.1 $lib_m"
+            if test "x$ap_platform_runtime_link_flag" != "x"; then
 
   if test "x$LUA_LIBS" = "x"; then
     test "x$silent" != "xyes" && echo "  setting LUA_LIBS to \"$ap_platform_runtime_link_flag${x}/lib/lua-5.1\""
@@ -21143,24 +20778,13 @@ $as_echo "yes" >&6; }
     done
   fi
 
-                fi
-                LUA_CFLAGS="-I${x}/include/lua-5.1"
-
-else
-
-                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
+            fi
+            LUA_CFLAGS="-I${x}/include/lua-5.1"
 
 fi
 
-
         CFLAGS=$save_CFLAGS
         LDFLAGS=$save_LDFLAGS
-        LIBS=$save_LIBS
 
         if test -n "${LUA_LIBS}"; then
             break
@@ -21175,14 +20799,10 @@ $as_echo_n "checking for lua.h in ${x}/include/lua5.1... " >&6; }
     if test -f ${x}/include/lua5.1/lua.h; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-
         save_CFLAGS=$CFLAGS
         save_LDFLAGS=$LDFLAGS
-        save_LIBS=$LIBS
-
         CFLAGS="$CFLAGS"
         LDFLAGS="-L${x}/lib $LDFLAGS $lib_m"
-
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for luaL_newstate in -llua5.1" >&5
 $as_echo_n "checking for luaL_newstate in -llua5.1... " >&6; }
 if ${ac_cv_lib_lua5_1_luaL_newstate+:} false; then :
@@ -21221,40 +20841,8 @@ fi
 $as_echo "$ac_cv_lib_lua5_1_luaL_newstate" >&6; }
 if test "x$ac_cv_lib_lua5_1_luaL_newstate" = xyes; then :
 
-                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for luaL_register in -llua5.1" >&5
-$as_echo_n "checking for luaL_register in -llua5.1... " >&6; }
-            CFLAGS="$CFLAGS -I${x}/include/lua5.1"
-            LIBS="-llua5.1"
-            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-                    #define LUA_COMPAT_ALL
-                    #define LUA_COMPAT_5_2
-                    #define LUA_COMPAT_5_1
-                    #define LUA_COMPAT_MODULE
-
-                    #include <lua.h>
-                    #include <lauxlib.h>
-
-int
-main ()
-{
-
-                    /* This isn't a valid call, but we're testing linkability */
-                    luaL_register(NULL, NULL, NULL);
-
-  ;
-  return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-                LUA_LIBS="-L${x}/lib -llua5.1 $lib_m"
-                if test "x$ap_platform_runtime_link_flag" != "x"; then
+            LUA_LIBS="-L${x}/lib -llua5.1 $lib_m"
+            if test "x$ap_platform_runtime_link_flag" != "x"; then
 
   if test "x$LUA_LIBS" = "x"; then
     test "x$silent" != "xyes" && echo "  setting LUA_LIBS to \"$ap_platform_runtime_link_flag${x}/lib\""
@@ -21276,24 +20864,13 @@ $as_echo "yes" >&6; }
     done
   fi
 
-                fi
-                LUA_CFLAGS="-I${x}/include/lua5.1"
-
-else
-
-                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
+            fi
+            LUA_CFLAGS="-I${x}/include/lua5.1"
 
 fi
 
-
         CFLAGS=$save_CFLAGS
         LDFLAGS=$save_LDFLAGS
-        LIBS=$save_LIBS
 
         if test -n "${LUA_LIBS}"; then
             break
@@ -21308,14 +20885,10 @@ $as_echo_n "checking for lua.h in ${x}/include/lua51... " >&6; }
     if test -f ${x}/include/lua51/lua.h; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-
         save_CFLAGS=$CFLAGS
         save_LDFLAGS=$LDFLAGS
-        save_LIBS=$LIBS
-
         CFLAGS="$CFLAGS"
         LDFLAGS="-L${x}/lib/lua51 $LDFLAGS $lib_m"
-
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for luaL_newstate in -llua" >&5
 $as_echo_n "checking for luaL_newstate in -llua... " >&6; }
 if ${ac_cv_lib_lua_luaL_newstate+:} false; then :
@@ -21354,40 +20927,8 @@ fi
 $as_echo "$ac_cv_lib_lua_luaL_newstate" >&6; }
 if test "x$ac_cv_lib_lua_luaL_newstate" = xyes; then :
 
-                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for luaL_register in -llua" >&5
-$as_echo_n "checking for luaL_register in -llua... " >&6; }
-            CFLAGS="$CFLAGS -I${x}/include/lua51"
-            LIBS="-llua"
-            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-                    #define LUA_COMPAT_ALL
-                    #define LUA_COMPAT_5_2
-                    #define LUA_COMPAT_5_1
-                    #define LUA_COMPAT_MODULE
-
-                    #include <lua.h>
-                    #include <lauxlib.h>
-
-int
-main ()
-{
-
-                    /* This isn't a valid call, but we're testing linkability */
-                    luaL_register(NULL, NULL, NULL);
-
-  ;
-  return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-                LUA_LIBS="-L${x}/lib/lua51 -llua $lib_m"
-                if test "x$ap_platform_runtime_link_flag" != "x"; then
+            LUA_LIBS="-L${x}/lib/lua51 -llua $lib_m"
+            if test "x$ap_platform_runtime_link_flag" != "x"; then
 
   if test "x$LUA_LIBS" = "x"; then
     test "x$silent" != "xyes" && echo "  setting LUA_LIBS to \"$ap_platform_runtime_link_flag${x}/lib/lua51\""
@@ -21409,24 +20950,13 @@ $as_echo "yes" >&6; }
     done
   fi
 
-                fi
-                LUA_CFLAGS="-I${x}/include/lua51"
-
-else
-
-                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
+            fi
+            LUA_CFLAGS="-I${x}/include/lua51"
 
 fi
 
-
         CFLAGS=$save_CFLAGS
         LDFLAGS=$save_LDFLAGS
-        LIBS=$save_LIBS
 
         if test -n "${LUA_LIBS}"; then
             break
diff --git a/docs/manual/howto/http2.html.fr b/docs/manual/howto/http2.html.fr
index b27df80..a8ef381 100644
--- a/docs/manual/howto/http2.html.fr
+++ b/docs/manual/howto/http2.html.fr
@@ -27,13 +27,11 @@
 <a href="../es/howto/http2.html" hreflang="es" rel="alternate" title="Espa�ol"> es </a> |
 <a href="../fr/howto/http2.html" title="Fran�ais"> fr </a></p>
 </div>
-<div class="outofdate">Cette traduction peut �tre p�rim�e. V�rifiez la version
-            anglaise pour les changements r�cents.</div>
 
     <p>Ce document est le guide de l'utilisateur de l'impl�mentation de HTTP/2
-    dans Apache httpd. Cette fonctionnalit� en est au stade
-    <em>exp�rimental</em>, et des modifications sont � pr�voir dans
-    les interfaces et les directives avec les changements de versions.
+    dans Apache httpd. Cette fonctionnalit� en est au stade de
+    <em>production</em>, et les interfaces et directives devraient
+    maintenant se stabiliser.
     </p>
   </div>
 <div id="quickview"><a href="https://www.apache.org/foundation/contributing.html" class="badge"><img src="https://www.apache.org/images/SupportApache-small.png" alt="Support Apache!" /></a><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#protocol">Le protocole HTTP/2</a></li>
diff --git a/docs/manual/mod/core.html.en b/docs/manual/mod/core.html.en
index 254f212..440ebfb 100644
--- a/docs/manual/mod/core.html.en
+++ b/docs/manual/mod/core.html.en
@@ -850,12 +850,11 @@ DocumentRoot "/var/www/${servername}/htdocs"</pre>
     <p>Variable names may not contain colon ":" characters, to avoid clashes
     with <code class="directive"><a href="../mod/mod_rewrite.html#rewritemap">RewriteMap</a></code>'s syntax.</p>
 
-    <p>While this directive is supported in virtual host and directory context,
-       the changes it makes are visible to any later configuration
-       directives, beyond any enclosing configuration section (matching or not).
-       Support for the other configuration sections was erroneously permitted by the initial
-       implementation of this directive and is only preserved (with unintuitive 
-       results) to maintain backward compatibility.</p>
+    <div class="note"><h3>Virtual Host scope and pitfalls</h3>
+      <p>While this directive is supported in virtual host context,
+         the changes it makes are visible to any later configuration
+         directives, beyond any enclosing virtual host.</p>
+    </div>
 
 <h3>See also</h3>
 <ul>
diff --git a/docs/manual/mod/core.html.fr b/docs/manual/mod/core.html.fr
index 4fbc916..f9cc8fd 100644
--- a/docs/manual/mod/core.html.fr
+++ b/docs/manual/mod/core.html.fr
@@ -891,12 +891,11 @@ DocumentRoot "/var/www/${servername}/htdocs"</pre>
     <p>Le caract�re ":" est interdit dans les noms de variables afin
     d'�viter les conflits avec la syntaxe de la directive <code class="directive"><a href="../mod/mod_rewrite.html#rewritemap">RewriteMap</a></code>.</p>
 
+    <div class="note"><h3>Port�e de la directive et pi�ges � �viter</h3>
     <p>Si cette directive est d�finie au sein d'un bloc VirtualHost, les
     changements qu'elle induit sont visibles de toute directive
-    ult�rieure, au del� de tout bloc VirtualHost. Le support des autres sections
-    de configuration a �t� permis par erreur par l'impl�mentation initiale de
-    cette directive, et n'est conserv� (avec des effets impr�visibles) que dans un
-    but de compatibilit� ascendante.</p>
+    ult�rieure, au del� de tout bloc VirtualHost.</p>
+    </div>
 
 <h3>Voir aussi</h3>
 <ul>
diff --git a/docs/manual/mod/mod_rewrite.html.fr b/docs/manual/mod/mod_rewrite.html.fr
index 5d9c0ed..eb17020 100644
--- a/docs/manual/mod/mod_rewrite.html.fr
+++ b/docs/manual/mod/mod_rewrite.html.fr
@@ -29,8 +29,6 @@
 <p><span>Langues Disponibles: </span><a href="../en/mod/mod_rewrite.html" hreflang="en" rel="alternate" title="English"> en </a> |
 <a href="../fr/mod/mod_rewrite.html" title="Fran�ais"> fr </a></p>
 </div>
-<div class="outofdate">Cette traduction peut �tre p�rim�e. V�rifiez la version
-            anglaise pour les changements r�cents.</div>
 <table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Ce module fournit un moteur de r��criture � base de
 r�gles permettant de r��crire les URLs des requ�tes
 � la vol�e</td></tr>
diff --git a/docs/manual/style/version.ent b/docs/manual/style/version.ent
index b527680..66952cd 100644
--- a/docs/manual/style/version.ent
+++ b/docs/manual/style/version.ent
@@ -19,6 +19,6 @@
 
 <!ENTITY httpd.major "2">
 <!ENTITY httpd.minor "4">
-<!ENTITY httpd.patch "26">
+<!ENTITY httpd.patch "27">
 
 <!ENTITY httpd.docs "2.4">
diff --git a/httpd.spec b/httpd.spec
index 1f6f105..c4839eb 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -4,7 +4,7 @@
 
 Summary: Apache HTTP Server
 Name: httpd
-Version: 2.4.26
+Version: 2.4.27
 Release: 1
 URL: http://httpd.apache.org/
 Vendor: Apache Software Foundation
@@ -383,6 +383,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/httpd/modules/mod_proxy_http.so
 %{_libdir}/httpd/modules/mod_proxy_scgi.so
 %{_libdir}/httpd/modules/mod_proxy_wstunnel.so
+%{_libdir}/httpd/modules/mod_proxy_hcheck.so
 %{_libdir}/httpd/modules/mod_proxy.so
 %{_libdir}/httpd/modules/mod_ratelimit.so
 %{_libdir}/httpd/modules/mod_reflector.so
diff --git a/include/ap_release.h b/include/ap_release.h
index 44389d8..5e83332 100644
--- a/include/ap_release.h
+++ b/include/ap_release.h
@@ -43,7 +43,7 @@
 
 #define AP_SERVER_MAJORVERSION_NUMBER 2
 #define AP_SERVER_MINORVERSION_NUMBER 4
-#define AP_SERVER_PATCHLEVEL_NUMBER   26
+#define AP_SERVER_PATCHLEVEL_NUMBER   27
 #define AP_SERVER_DEVBUILD_BOOLEAN    0
 
 /* Synchronize the above with docs/manual/style/version.ent */
diff --git a/modules/aaa/mod_auth_digest.c b/modules/aaa/mod_auth_digest.c
index d998d32..e99cb3b 100644
--- a/modules/aaa/mod_auth_digest.c
+++ b/modules/aaa/mod_auth_digest.c
@@ -842,7 +842,7 @@ static long gc(server_rec *s)
 
             if (err) {
                 /* Nothing we can really do but log... */
-                ap_log_error(APLOG_MARK, APLOG_ERR, err, s, APLOGNO()
+                ap_log_error(APLOG_MARK, APLOG_ERR, err, s, APLOGNO(10007)
                              "Failed to free auth_digest client allocation");
             }
         }
@@ -965,13 +965,13 @@ static int get_digest_rec(request_rec *r, digest_header_rec *resp)
 
         /* find value */
 
+        vv = 0;
         if (auth_line[0] == '=') {
             auth_line++;
             while (apr_isspace(auth_line[0])) {
                 auth_line++;
             }
 
-            vv = 0;
             if (auth_line[0] == '\"') {         /* quoted string */
                 auth_line++;
                 while (auth_line[0] != '\"' && auth_line[0] != '\0') {
@@ -990,8 +990,8 @@ static int get_digest_rec(request_rec *r, digest_header_rec *resp)
                     value[vv++] = *auth_line++;
                 }
             }
-            value[vv] = '\0';
         }
+        value[vv] = '\0';
 
         while (auth_line[0] != ',' && auth_line[0] != '\0') {
             auth_line++;
diff --git a/modules/aaa/mod_authnz_ldap.c b/modules/aaa/mod_authnz_ldap.c
index 2f987d8..8cee7d4 100644
--- a/modules/aaa/mod_authnz_ldap.c
+++ b/modules/aaa/mod_authnz_ldap.c
@@ -490,6 +490,9 @@ static authn_status authn_ldap_check_password(request_rec *r, const char *user,
      * Basic sanity checks before any LDAP operations even happen.
      */
     if (!sec->have_ldap_url) {
+        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(02558) 
+                      "no AuthLDAPURL");
+
         return AUTH_GENERAL_ERROR;
     }
 
@@ -1865,6 +1868,7 @@ static int authnz_ldap_post_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *
 static const authn_provider authn_ldap_provider =
 {
     &authn_ldap_check_password,
+    NULL,
 };
 
 static const authz_provider authz_ldapuser_provider =
diff --git a/modules/cache/mod_cache_socache.c b/modules/cache/mod_cache_socache.c
index 09b7823..11e9502 100644
--- a/modules/cache/mod_cache_socache.c
+++ b/modules/cache/mod_cache_socache.c
@@ -77,13 +77,13 @@ typedef struct cache_socache_object_t
     cache_socache_info_t socache_info; /* Header information. */
     apr_size_t body_offset; /* offset to the start of the body */
     apr_off_t body_length; /* length of the cached entity body */
-    unsigned int newbody :1; /* whether a new body is present */
     apr_time_t expire; /* when to expire the entry */
 
     const char *name; /* Requested URI without vary bits - suitable for mortals. */
     const char *key; /* On-disk prefix; URI with Vary bits (if present) */
     apr_off_t offset; /* Max size to set aside */
     apr_time_t timeout; /* Max time to set aside */
+    unsigned int newbody :1; /* whether a new body is present */
     unsigned int done :1; /* Is the attempt to cache complete? */
 } cache_socache_object_t;
 
@@ -270,7 +270,8 @@ static apr_status_t store_table(apr_table_t *table, unsigned char *buffer,
 }
 
 static const char* regen_key(apr_pool_t *p, apr_table_t *headers,
-        apr_array_header_t *varray, const char *oldkey)
+                             apr_array_header_t *varray, const char *oldkey,
+                             apr_size_t *newkeylen)
 {
     struct iovec *iov;
     int i, k;
@@ -322,7 +323,7 @@ static const char* regen_key(apr_pool_t *p, apr_table_t *headers,
     iov[k].iov_len = strlen(oldkey);
     k++;
 
-    return apr_pstrcatv(p, iov, k, NULL);
+    return apr_pstrcatv(p, iov, k, newkeylen);
 }
 
 static int array_alphasort(const void *fn1, const void *fn2)
@@ -526,7 +527,7 @@ static int open_entity(cache_handle_t *h, request_rec *r, const char *key)
             return DECLINED;
         }
 
-        nkey = regen_key(r->pool, r->headers_in, varray, key);
+        nkey = regen_key(r->pool, r->headers_in, varray, key, &len);
 
         /* attempt to retrieve the cached entry */
         if (socache_mutex) {
@@ -542,7 +543,7 @@ static int open_entity(cache_handle_t *h, request_rec *r, const char *key)
         buffer_len = sobj->buffer_len;
         rc = conf->provider->socache_provider->retrieve(
                 conf->provider->socache_instance, r->server,
-                (unsigned char *) nkey, strlen(nkey), sobj->buffer,
+                (unsigned char *) nkey, len, sobj->buffer,
                 &buffer_len, r->pool);
         if (socache_mutex) {
             apr_status_t status = apr_global_mutex_unlock(socache_mutex);
@@ -869,7 +870,7 @@ static apr_status_t store_headers(cache_handle_t *h, request_rec *r,
             }
 
             obj->key = sobj->key = regen_key(r->pool, sobj->headers_in, varray,
-                    sobj->name);
+                                             sobj->name, NULL);
         }
     }
 
@@ -1248,7 +1249,7 @@ static const char *set_cache_socache(cmd_parms *cmd, void *in_struct_ptr,
             name, AP_SOCACHE_PROVIDER_VERSION);
     if (provider->socache_provider == NULL) {
         err = apr_psprintf(cmd->pool,
-                "Unknown socache provider '%s'. Maybe you need "
+                    "Unknown socache provider '%s'. Maybe you need "
                     "to load the appropriate socache module "
                     "(mod_socache_%s?)", name, name);
     }
@@ -1416,7 +1417,7 @@ static int socache_precfg(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptmp)
             APR_LOCK_DEFAULT, 0);
     if (rv != APR_SUCCESS) {
         ap_log_perror(APLOG_MARK, APLOG_CRIT, rv, plog, APLOGNO(02390)
-        "failed to register %s mutex", cache_socache_id);
+                "failed to register %s mutex", cache_socache_id);
         return 500; /* An HTTP status would be a misnomer! */
     }
 
@@ -1450,7 +1451,7 @@ static int socache_post_config(apr_pool_t *pconf, apr_pool_t *plog,
                     NULL, s, pconf, 0);
             if (rv != APR_SUCCESS) {
                 ap_log_perror(APLOG_MARK, APLOG_CRIT, rv, plog, APLOGNO(02391)
-                "failed to create %s mutex", cache_socache_id);
+                        "failed to create %s mutex", cache_socache_id);
                 return 500; /* An HTTP status would be a misnomer! */
             }
             apr_pool_cleanup_register(pconf, NULL, remove_lock,
@@ -1471,7 +1472,7 @@ static int socache_post_config(apr_pool_t *pconf, apr_pool_t *plog,
                 &socache_hints, s, pconf);
         if (rv != APR_SUCCESS) {
             ap_log_perror(APLOG_MARK, APLOG_CRIT, rv, plog, APLOGNO(02393)
-            "failed to initialise %s cache", cache_socache_id);
+                    "failed to initialise %s cache", cache_socache_id);
             return 500; /* An HTTP status would be a misnomer! */
         }
         apr_pool_cleanup_register(pconf, (void *) s, destroy_cache,
diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c
index 7c46577..8543fd1 100644
--- a/modules/http/http_protocol.c
+++ b/modules/http/http_protocol.c
@@ -1037,11 +1037,7 @@ static char *make_allow(request_rec *r)
 
         apr_hash_this(hi, &key, NULL, &val);
         if ((mask & (AP_METHOD_BIT << *(int *)val)) != 0) {
-            *(const char **)apr_array_push(allow) = key;
-
-            /* the M_GET method actually refers to two methods */
-            if (*(int *)val == M_GET)
-                *(const char **)apr_array_push(allow) = "HEAD";
+            APR_ARRAY_PUSH(allow, const char *) = key;
         }
     }
 
diff --git a/modules/http2/h2_conn.c b/modules/http2/h2_conn.c
index fcf6bad..e2502c2 100644
--- a/modules/http2/h2_conn.c
+++ b/modules/http2/h2_conn.c
@@ -47,6 +47,7 @@ static struct h2_workers *workers;
 static h2_mpm_type_t mpm_type = H2_MPM_UNKNOWN;
 static module *mpm_module;
 static int async_mpm;
+static int mpm_supported = 1;
 static apr_socket_t *dummy_socket;
 
 static void check_modules(int force) 
@@ -76,11 +77,18 @@ static void check_modules(int force)
             else if (!strcmp("prefork.c", m->name)) {
                 mpm_type = H2_MPM_PREFORK;
                 mpm_module = m;
+                /* While http2 can work really well on prefork, it collides
+                 * today's use case for prefork: runnning single-thread app engines
+                 * like php. If we restrict h2_workers to 1 per process, php will
+                 * work fine, but browser will be limited to 1 active request at a
+                 * time. */
+                mpm_supported = 0;
                 break;
             }
             else if (!strcmp("simple_api.c", m->name)) {
                 mpm_type = H2_MPM_SIMPLE;
                 mpm_module = m;
+                mpm_supported = 0;
                 break;
             }
             else if (!strcmp("mpm_winnt.c", m->name)) {
@@ -107,7 +115,6 @@ apr_status_t h2_conn_child_init(apr_pool_t *pool, server_rec *s)
     int idle_secs = 0;
 
     check_modules(1);
-    
     ap_mpm_query(AP_MPMQ_MAX_THREADS, &max_threads_per_child);
     
     status = ap_mpm_query(AP_MPMQ_IS_ASYNC, &async_mpm);
@@ -157,6 +164,18 @@ h2_mpm_type_t h2_conn_mpm_type(void)
     return mpm_type;
 }
 
+const char *h2_conn_mpm_name(void)
+{
+    check_modules(0);
+    return mpm_module? mpm_module->name : "unknown";
+}
+
+int h2_mpm_supported(void)
+{
+    check_modules(0);
+    return mpm_supported;
+}
+
 static module *h2_conn_mpm_module(void)
 {
     check_modules(0);
diff --git a/modules/http2/h2_conn.h b/modules/http2/h2_conn.h
index 7994864..7111a6c 100644
--- a/modules/http2/h2_conn.h
+++ b/modules/http2/h2_conn.h
@@ -64,7 +64,8 @@ typedef enum {
 
 /* Returns the type of MPM module detected */
 h2_mpm_type_t h2_conn_mpm_type(void);
-
+const char *h2_conn_mpm_name(void);
+int h2_mpm_supported(void);
 
 conn_rec *h2_slave_create(conn_rec *master, int slave_id, apr_pool_t *parent);
 void h2_slave_destroy(conn_rec *slave);
diff --git a/modules/http2/h2_mplx.c b/modules/http2/h2_mplx.c
index b73bd0d..204e954 100644
--- a/modules/http2/h2_mplx.c
+++ b/modules/http2/h2_mplx.c
@@ -125,9 +125,9 @@ static void stream_cleanup(h2_mplx *m, h2_stream *stream)
     
     h2_stream_cleanup(stream);
 
-    h2_iq_remove(m->q, stream->id);
-    h2_fifo_remove(m->readyq, stream);
     h2_ihash_remove(m->streams, stream->id);
+    h2_iq_remove(m->q, stream->id);
+    h2_ififo_remove(m->readyq, stream->id);
     h2_ihash_add(m->shold, stream);
     
     if (!stream->task || stream->task->worker_done) {
@@ -218,7 +218,7 @@ h2_mplx *h2_mplx_create(conn_rec *c, apr_pool_t *parent,
         m->spurge = h2_ihash_create(m->pool, offsetof(h2_stream,id));
         m->q = h2_iq_create(m->pool, m->max_streams);
 
-        status = h2_fifo_set_create(&m->readyq, m->pool, m->max_streams);
+        status = h2_ififo_set_create(&m->readyq, m->pool, m->max_streams);
         if (status != APR_SUCCESS) {
             apr_pool_destroy(m->pool);
             return NULL;
@@ -481,9 +481,6 @@ void h2_mplx_release_and_join(h2_mplx *m, apr_thread_cond_t *wait)
     
     H2_MPLX_LEAVE(m);
 
-    /* 5. unregister again, now that our workers are done */
-    h2_workers_unregister(m->workers, m);
-
     ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, m->c,
                   "h2_mplx(%ld): released", m->id);
 }
@@ -630,7 +627,7 @@ apr_status_t h2_mplx_out_trywait(h2_mplx *m, apr_interval_time_t timeout,
 
 static void check_data_for(h2_mplx *m, h2_stream *stream, int lock)
 {
-    if (h2_fifo_push(m->readyq, stream) == APR_SUCCESS) {
+    if (h2_ififo_push(m->readyq, stream->id) == APR_SUCCESS) {
         apr_atomic_set32(&m->event_pending, 1);
         H2_MPLX_ENTER_MAYBE(m, lock);
         if (m->added_output) {
@@ -662,7 +659,7 @@ apr_status_t h2_mplx_reprioritize(h2_mplx *m, h2_stream_pri_cmp *cmp, void *ctx)
 
 static void register_if_needed(h2_mplx *m) 
 {
-    if (!m->is_registered && !h2_iq_empty(m->q)) {
+    if (!m->aborted && !m->is_registered && !h2_iq_empty(m->q)) {
         apr_status_t status = h2_workers_register(m->workers, m); 
         if (status == APR_SUCCESS) {
             m->is_registered = 1;
@@ -755,25 +752,27 @@ static h2_task *next_stream_task(h2_mplx *m)
     return NULL;
 }
 
-h2_task *h2_mplx_pop_task(h2_mplx *m, int *has_more)
+apr_status_t h2_mplx_pop_task(h2_mplx *m, h2_task **ptask)
 {
-    h2_task *task = NULL;
+    apr_status_t rv = APR_EOF;
     
-    H2_MPLX_ENTER_ALWAYS(m);
-
-    *has_more = 0;
-    if (!m->aborted) {
-        task = next_stream_task(m);
-        if (task != NULL && !h2_iq_empty(m->q)) {
-            *has_more = 1;
-        }
-        else {
-            m->is_registered = 0; /* h2_workers will discard this mplx */
-        }
+    *ptask = NULL;
+    if (APR_SUCCESS != (rv = apr_thread_mutex_lock(m->lock))) {
+        return rv;
+    }
+    
+    if (m->aborted) {
+        rv = APR_EOF;
+    }
+    else {
+        *ptask = next_stream_task(m);
+        rv = (*ptask != NULL && !h2_iq_empty(m->q))? APR_EAGAIN : APR_SUCCESS;
+    }
+    if (APR_EAGAIN != rv) {
+        m->is_registered = 0; /* h2_workers will discard this mplx */
     }
-
     H2_MPLX_LEAVE(m);
-    return task;
+    return rv;
 }
 
 static void task_done(h2_mplx *m, h2_task *task, h2_req_engine *ngn)
@@ -1234,7 +1233,7 @@ apr_status_t h2_mplx_dispatch_master_events(h2_mplx *m,
                                             void *on_ctx)
 {
     h2_stream *stream;
-    int n;
+    int n, id;
     
     ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, m->c, 
                   "h2_mplx(%ld): dispatch events", m->id);        
@@ -1244,11 +1243,14 @@ apr_status_t h2_mplx_dispatch_master_events(h2_mplx *m,
     h2_ihash_iter(m->streams, report_consumption_iter, m);    
     purge_streams(m, 1);
     
-    n = h2_fifo_count(m->readyq);
+    n = h2_ififo_count(m->readyq);
     while (n > 0 
-           && (h2_fifo_try_pull(m->readyq, (void**)&stream) == APR_SUCCESS)) {
+           && (h2_ififo_try_pull(m->readyq, &id) == APR_SUCCESS)) {
         --n;
-        on_resume(on_ctx, stream);
+        stream = h2_ihash_get(m->streams, id);
+        if (stream) {
+            on_resume(on_ctx, stream);
+        }
     }
     
     return APR_SUCCESS;
@@ -1269,7 +1271,7 @@ int h2_mplx_awaits_data(h2_mplx *m)
     if (h2_ihash_empty(m->streams)) {
         waiting = 0;
     }
-    else if (!m->tasks_active && !h2_fifo_count(m->readyq)
+    else if (!m->tasks_active && !h2_ififo_count(m->readyq)
              && h2_iq_empty(m->q)) {
         waiting = 0;
     }
diff --git a/modules/http2/h2_mplx.h b/modules/http2/h2_mplx.h
index 61b1b99..04ba7a8 100644
--- a/modules/http2/h2_mplx.h
+++ b/modules/http2/h2_mplx.h
@@ -69,7 +69,7 @@ struct h2_mplx {
     struct h2_ihash_t *spurge;      /* all streams done, ready for destroy */
     
     struct h2_iqueue *q;            /* all stream ids that need to be started */
-    struct h2_fifo *readyq;         /* all streams ready for output */
+    struct h2_ififo *readyq;        /* all stream ids ready for output */
         
     struct h2_ihash_t *redo_tasks;  /* all tasks that need to be redone */
     
@@ -124,7 +124,7 @@ h2_mplx *h2_mplx_create(conn_rec *c, apr_pool_t *master,
  */ 
 void h2_mplx_release_and_join(h2_mplx *m, struct apr_thread_cond_t *wait);
 
-struct h2_task *h2_mplx_pop_task(h2_mplx *mplx, int *has_more);
+apr_status_t h2_mplx_pop_task(h2_mplx *m, struct h2_task **ptask);
 
 void h2_mplx_task_done(h2_mplx *m, struct h2_task *task, struct h2_task **ptask);
 
diff --git a/modules/http2/h2_session.c b/modules/http2/h2_session.c
index bc24bb4..da85d70 100644
--- a/modules/http2/h2_session.c
+++ b/modules/http2/h2_session.c
@@ -326,6 +326,7 @@ static int on_frame_recv_cb(nghttp2_session *ng2s,
 {
     h2_session *session = (h2_session *)userp;
     h2_stream *stream;
+    apr_status_t rv = APR_SUCCESS;
     
     if (APLOGcdebug(session->c)) {
         char buffer[256];
@@ -346,7 +347,7 @@ static int on_frame_recv_cb(nghttp2_session *ng2s,
              * trailers */
             stream = h2_session_stream_get(session, frame->hd.stream_id);
             if (stream) {
-                h2_stream_recv_frame(stream, NGHTTP2_HEADERS, frame->hd.flags);
+                rv = h2_stream_recv_frame(stream, NGHTTP2_HEADERS, frame->hd.flags);
             }
             break;
         case NGHTTP2_DATA:
@@ -356,7 +357,7 @@ static int on_frame_recv_cb(nghttp2_session *ng2s,
                               H2_STRM_LOG(APLOGNO(02923), stream, 
                               "DATA, len=%ld, flags=%d"), 
                               (long)frame->hd.length, frame->hd.flags);
-                h2_stream_recv_frame(stream, NGHTTP2_DATA, frame->hd.flags);
+                rv = h2_stream_recv_frame(stream, NGHTTP2_DATA, frame->hd.flags);
             }
             break;
         case NGHTTP2_PRIORITY:
@@ -411,7 +412,7 @@ static int on_frame_recv_cb(nghttp2_session *ng2s,
             }
             break;
     }
-    return 0;
+    return (APR_SUCCESS == rv)? 0 : NGHTTP2_ERR_PROTO;
 }
 
 static int h2_session_continue_data(h2_session *session) {
diff --git a/modules/http2/h2_stream.c b/modules/http2/h2_stream.c
index 4cd2132..925f3d6 100644
--- a/modules/http2/h2_stream.c
+++ b/modules/http2/h2_stream.c
@@ -444,7 +444,13 @@ apr_status_t h2_stream_recv_frame(h2_stream *stream, int ftype, int flags)
             else {
                 /* request HEADER */
                 ap_assert(stream->request == NULL);
-                ap_assert(stream->rtmp != NULL);
+                if (stream->rtmp == NULL) {
+                    /* This can only happen, if the stream has received no header
+                     * name/value pairs at all. The lastest nghttp2 version have become
+                     * pretty good at detecting this early. In any case, we have
+                     * to abort the connection here, since this is clearly a protocol error */
+                    return APR_EINVAL;
+                }
                 status = h2_request_end_headers(stream->rtmp, stream->pool, eos);
                 if (status != APR_SUCCESS) {
                     return status;
@@ -739,9 +745,13 @@ apr_status_t h2_stream_add_header(h2_stream *stream,
         status = h2_request_add_header(stream->rtmp, stream->pool,
                                        name, nlen, value, vlen);
     }
-    else  {
+    else if (H2_SS_OPEN == stream->state) {
         status = add_trailer(stream, name, nlen, value, vlen);
     }
+    else {
+        status = APR_EINVAL;
+    }
+    
     if (status != APR_SUCCESS) {
         ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, session->c,
                       H2_STRM_MSG(stream, "header %s not accepted"), name);
diff --git a/modules/http2/h2_switch.c b/modules/http2/h2_switch.c
index 8a8d56e..5b1247e 100644
--- a/modules/http2/h2_switch.c
+++ b/modules/http2/h2_switch.c
@@ -55,6 +55,10 @@ static int h2_protocol_propose(conn_rec *c, request_rec *r,
     const char **protos = is_tls? h2_tls_protos : h2_clear_protos;
     
     (void)s;
+    if (!h2_mpm_supported()) {
+        return DECLINED;
+    }
+    
     if (strcmp(AP_PROTOCOL_HTTP1, ap_get_protocol(c))) {
         /* We do not know how to switch from anything else but http/1.1.
          */
@@ -127,6 +131,10 @@ static int h2_protocol_switch(conn_rec *c, request_rec *r, server_rec *s,
     const char **p = protos;
     
     (void)s;
+    if (!h2_mpm_supported()) {
+        return DECLINED;
+    }
+
     while (*p) {
         if (!strcmp(*p, protocol)) {
             found = 1;
diff --git a/modules/http2/h2_util.c b/modules/http2/h2_util.c
index 01b506a..e1879cb 100644
--- a/modules/http2/h2_util.c
+++ b/modules/http2/h2_util.c
@@ -695,16 +695,47 @@ int h2_fifo_count(h2_fifo *fifo)
 
 static apr_status_t check_not_empty(h2_fifo *fifo, int block)
 {
-    if (fifo->count == 0) {
+    while (fifo->count == 0) {
         if (!block) {
             return APR_EAGAIN;
         }
-        while (fifo->count == 0) {
-            if (fifo->aborted) {
-                return APR_EOF;
+        if (fifo->aborted) {
+            return APR_EOF;
+        }
+        apr_thread_cond_wait(fifo->not_empty, fifo->lock);
+    }
+    return APR_SUCCESS;
+}
+
+static apr_status_t fifo_push_int(h2_fifo *fifo, void *elem, int block)
+{
+    if (fifo->aborted) {
+        return APR_EOF;
+    }
+
+    if (fifo->set && index_of(fifo, elem) >= 0) {
+        /* set mode, elem already member */
+        return APR_EEXIST;
+    }
+    else if (fifo->count == fifo->nelems) {
+        if (block) {
+            while (fifo->count == fifo->nelems) {
+                if (fifo->aborted) {
+                    return APR_EOF;
+                }
+                apr_thread_cond_wait(fifo->not_full, fifo->lock);
             }
-            apr_thread_cond_wait(fifo->not_empty, fifo->lock);
         }
+        else {
+            return APR_EAGAIN;
+        }
+    }
+    
+    ap_assert(fifo->count < fifo->nelems);
+    fifo->elems[nth_index(fifo, fifo->count)] = elem;
+    ++fifo->count;
+    if (fifo->count == 1) {
+        apr_thread_cond_broadcast(fifo->not_empty);
     }
     return APR_SUCCESS;
 }
@@ -718,33 +749,7 @@ static apr_status_t fifo_push(h2_fifo *fifo, void *elem, int block)
     }
 
     if ((rv = apr_thread_mutex_lock(fifo->lock)) == APR_SUCCESS) {
-        if (fifo->set && index_of(fifo, elem) >= 0) {
-            /* set mode, elem already member */
-            apr_thread_mutex_unlock(fifo->lock);
-            return APR_EEXIST;
-        }
-        else if (fifo->count == fifo->nelems) {
-            if (block) {
-                while (fifo->count == fifo->nelems) {
-                    if (fifo->aborted) {
-                        apr_thread_mutex_unlock(fifo->lock);
-                        return APR_EOF;
-                    }
-                    apr_thread_cond_wait(fifo->not_full, fifo->lock);
-                }
-            }
-            else {
-                apr_thread_mutex_unlock(fifo->lock);
-                return APR_EAGAIN;
-            }
-        }
-        
-        ap_assert(fifo->count < fifo->nelems);
-        fifo->elems[nth_index(fifo, fifo->count)] = elem;
-        ++fifo->count;
-        if (fifo->count == 1) {
-            apr_thread_cond_broadcast(fifo->not_empty);
-        }
+        rv = fifo_push_int(fifo, elem, block);
         apr_thread_mutex_unlock(fifo->lock);
     }
     return rv;
@@ -760,12 +765,15 @@ apr_status_t h2_fifo_try_push(h2_fifo *fifo, void *elem)
     return fifo_push(fifo, elem, 0);
 }
 
-static void *pull_head(h2_fifo *fifo)
+static apr_status_t pull_head(h2_fifo *fifo, void **pelem, int block)
 {
-    void *elem;
+    apr_status_t rv;
     
-    ap_assert(fifo->count > 0);
-    elem = fifo->elems[fifo->head];
+    if ((rv = check_not_empty(fifo, block)) != APR_SUCCESS) {
+        *pelem = NULL;
+        return rv;
+    }
+    *pelem = fifo->elems[fifo->head];
     --fifo->count;
     if (fifo->count > 0) {
         fifo->head = nth_index(fifo, 1);
@@ -773,7 +781,7 @@ static void *pull_head(h2_fifo *fifo)
             apr_thread_cond_broadcast(fifo->not_full);
         }
     }
-    return elem;
+    return APR_SUCCESS;
 }
 
 static apr_status_t fifo_pull(h2_fifo *fifo, void **pelem, int block)
@@ -785,15 +793,7 @@ static apr_status_t fifo_pull(h2_fifo *fifo, void **pelem, int block)
     }
     
     if ((rv = apr_thread_mutex_lock(fifo->lock)) == APR_SUCCESS) {
-        if ((rv = check_not_empty(fifo, block)) != APR_SUCCESS) {
-            apr_thread_mutex_unlock(fifo->lock);
-            *pelem = NULL;
-            return rv;
-        }
-
-        ap_assert(fifo->count > 0);
-        *pelem = pull_head(fifo);
-
+        rv = pull_head(fifo, pelem, block);
         apr_thread_mutex_unlock(fifo->lock);
     }
     return rv;
@@ -818,25 +818,17 @@ static apr_status_t fifo_peek(h2_fifo *fifo, h2_fifo_peek_fn *fn, void *ctx, int
         return APR_EOF;
     }
     
-    if ((rv = apr_thread_mutex_lock(fifo->lock)) == APR_SUCCESS) {
-        if ((rv = check_not_empty(fifo, block)) != APR_SUCCESS) {
-            apr_thread_mutex_unlock(fifo->lock);
-            return rv;
+    if (APR_SUCCESS == (rv = apr_thread_mutex_lock(fifo->lock))) {
+        if (APR_SUCCESS == (rv = pull_head(fifo, &elem, block))) {
+            switch (fn(elem, ctx)) {
+                case H2_FIFO_OP_PULL:
+                    break;
+                case H2_FIFO_OP_REPUSH:
+                    rv = fifo_push_int(fifo, elem, block);
+                    break;
+            }
         }
-
-        ap_assert(fifo->count > 0);
-        elem = pull_head(fifo);
-        
         apr_thread_mutex_unlock(fifo->lock);
-
-        switch (fn(elem, ctx)) {
-            case H2_FIFO_OP_PULL:
-                break;
-            case H2_FIFO_OP_REPUSH:
-                return h2_fifo_push(fifo, elem);
-                break;
-        }
-        
     }
     return rv;
 }
@@ -889,6 +881,313 @@ apr_status_t h2_fifo_remove(h2_fifo *fifo, void *elem)
     return rv;
 }
 
+/*******************************************************************************
+ * FIFO int queue
+ ******************************************************************************/
+
+struct h2_ififo {
+    int *elems;
+    int nelems;
+    int set;
+    int head;
+    int count;
+    int aborted;
+    apr_thread_mutex_t *lock;
+    apr_thread_cond_t  *not_empty;
+    apr_thread_cond_t  *not_full;
+};
+
+static int inth_index(h2_ififo *fifo, int n) 
+{
+    return (fifo->head + n) % fifo->nelems;
+}
+
+static apr_status_t ififo_destroy(void *data) 
+{
+    h2_ififo *fifo = data;
+
+    apr_thread_cond_destroy(fifo->not_empty);
+    apr_thread_cond_destroy(fifo->not_full);
+    apr_thread_mutex_destroy(fifo->lock);
+
+    return APR_SUCCESS;
+}
+
+static int iindex_of(h2_ififo *fifo, int id)
+{
+    int i;
+    
+    for (i = 0; i < fifo->count; ++i) {
+        if (id == fifo->elems[inth_index(fifo, i)]) {
+            return i;
+        }
+    }
+    return -1;
+}
+
+static apr_status_t icreate_int(h2_ififo **pfifo, apr_pool_t *pool, 
+                                int capacity, int as_set)
+{
+    apr_status_t rv;
+    h2_ififo *fifo;
+    
+    fifo = apr_pcalloc(pool, sizeof(*fifo));
+    if (fifo == NULL) {
+        return APR_ENOMEM;
+    }
+
+    rv = apr_thread_mutex_create(&fifo->lock,
+                                 APR_THREAD_MUTEX_UNNESTED, pool);
+    if (rv != APR_SUCCESS) {
+        return rv;
+    }
+
+    rv = apr_thread_cond_create(&fifo->not_empty, pool);
+    if (rv != APR_SUCCESS) {
+        return rv;
+    }
+
+    rv = apr_thread_cond_create(&fifo->not_full, pool);
+    if (rv != APR_SUCCESS) {
+        return rv;
+    }
+
+    fifo->elems = apr_pcalloc(pool, capacity * sizeof(int));
+    if (fifo->elems == NULL) {
+        return APR_ENOMEM;
+    }
+    fifo->nelems = capacity;
+    fifo->set = as_set;
+    
+    *pfifo = fifo;
+    apr_pool_cleanup_register(pool, fifo, ififo_destroy, apr_pool_cleanup_null);
+
+    return APR_SUCCESS;
+}
+
+apr_status_t h2_ififo_create(h2_ififo **pfifo, apr_pool_t *pool, int capacity)
+{
+    return icreate_int(pfifo, pool, capacity, 0);
+}
+
+apr_status_t h2_ififo_set_create(h2_ififo **pfifo, apr_pool_t *pool, int capacity)
+{
+    return icreate_int(pfifo, pool, capacity, 1);
+}
+
+apr_status_t h2_ififo_term(h2_ififo *fifo)
+{
+    apr_status_t rv;
+    if ((rv = apr_thread_mutex_lock(fifo->lock)) == APR_SUCCESS) {
+        fifo->aborted = 1;
+        apr_thread_mutex_unlock(fifo->lock);
+    }
+    return rv;
+}
+
+apr_status_t h2_ififo_interrupt(h2_ififo *fifo)
+{
+    apr_status_t rv;
+    if ((rv = apr_thread_mutex_lock(fifo->lock)) == APR_SUCCESS) {
+        apr_thread_cond_broadcast(fifo->not_empty);
+        apr_thread_cond_broadcast(fifo->not_full);
+        apr_thread_mutex_unlock(fifo->lock);
+    }
+    return rv;
+}
+
+int h2_ififo_count(h2_ififo *fifo)
+{
+    return fifo->count;
+}
+
+static apr_status_t icheck_not_empty(h2_ififo *fifo, int block)
+{
+    while (fifo->count == 0) {
+        if (!block) {
+            return APR_EAGAIN;
+        }
+        if (fifo->aborted) {
+            return APR_EOF;
+        }
+        apr_thread_cond_wait(fifo->not_empty, fifo->lock);
+    }
+    return APR_SUCCESS;
+}
+
+static apr_status_t ififo_push_int(h2_ififo *fifo, int id, int block)
+{
+    if (fifo->aborted) {
+        return APR_EOF;
+    }
+
+    if (fifo->set && iindex_of(fifo, id) >= 0) {
+        /* set mode, elem already member */
+        return APR_EEXIST;
+    }
+    else if (fifo->count == fifo->nelems) {
+        if (block) {
+            while (fifo->count == fifo->nelems) {
+                if (fifo->aborted) {
+                    return APR_EOF;
+                }
+                apr_thread_cond_wait(fifo->not_full, fifo->lock);
+            }
+        }
+        else {
+            return APR_EAGAIN;
+        }
+    }
+    
+    ap_assert(fifo->count < fifo->nelems);
+    fifo->elems[inth_index(fifo, fifo->count)] = id;
+    ++fifo->count;
+    if (fifo->count == 1) {
+        apr_thread_cond_broadcast(fifo->not_empty);
+    }
+    return APR_SUCCESS;
+}
+
+static apr_status_t ififo_push(h2_ififo *fifo, int id, int block)
+{
+    apr_status_t rv;
+    
+    if (fifo->aborted) {
+        return APR_EOF;
+    }
+
+    if ((rv = apr_thread_mutex_lock(fifo->lock)) == APR_SUCCESS) {
+        rv = ififo_push_int(fifo, id, block);
+        apr_thread_mutex_unlock(fifo->lock);
+    }
+    return rv;
+}
+
+apr_status_t h2_ififo_push(h2_ififo *fifo, int id)
+{
+    return ififo_push(fifo, id, 1);
+}
+
+apr_status_t h2_ififo_try_push(h2_ififo *fifo, int id)
+{
+    return ififo_push(fifo, id, 0);
+}
+
+static apr_status_t ipull_head(h2_ififo *fifo, int *pi, int block)
+{
+    apr_status_t rv;
+    
+    if ((rv = icheck_not_empty(fifo, block)) != APR_SUCCESS) {
+        *pi = 0;
+        return rv;
+    }
+    *pi = fifo->elems[fifo->head];
+    --fifo->count;
+    if (fifo->count > 0) {
+        fifo->head = inth_index(fifo, 1);
+        if (fifo->count+1 == fifo->nelems) {
+            apr_thread_cond_broadcast(fifo->not_full);
+        }
+    }
+    return APR_SUCCESS;
+}
+
+static apr_status_t ififo_pull(h2_ififo *fifo, int *pi, int block)
+{
+    apr_status_t rv;
+    
+    if (fifo->aborted) {
+        return APR_EOF;
+    }
+    
+    if ((rv = apr_thread_mutex_lock(fifo->lock)) == APR_SUCCESS) {
+        rv = ipull_head(fifo, pi, block);
+        apr_thread_mutex_unlock(fifo->lock);
+    }
+    return rv;
+}
+
+apr_status_t h2_ififo_pull(h2_ififo *fifo, int *pi)
+{
+    return ififo_pull(fifo, pi, 1);
+}
+
+apr_status_t h2_ififo_try_pull(h2_ififo *fifo, int *pi)
+{
+    return ififo_pull(fifo, pi, 0);
+}
+
+static apr_status_t ififo_peek(h2_ififo *fifo, h2_ififo_peek_fn *fn, void *ctx, int block)
+{
+    apr_status_t rv;
+    int id;
+    
+    if (fifo->aborted) {
+        return APR_EOF;
+    }
+    
+    if (APR_SUCCESS == (rv = apr_thread_mutex_lock(fifo->lock))) {
+        if (APR_SUCCESS == (rv = ipull_head(fifo, &id, block))) {
+            switch (fn(id, ctx)) {
+                case H2_FIFO_OP_PULL:
+                    break;
+                case H2_FIFO_OP_REPUSH:
+                    rv = ififo_push_int(fifo, id, block);
+                    break;
+            }
+        }
+        apr_thread_mutex_unlock(fifo->lock);
+    }
+    return rv;
+}
+
+apr_status_t h2_ififo_peek(h2_ififo *fifo, h2_ififo_peek_fn *fn, void *ctx)
+{
+    return ififo_peek(fifo, fn, ctx, 1);
+}
+
+apr_status_t h2_ififo_try_peek(h2_ififo *fifo, h2_ififo_peek_fn *fn, void *ctx)
+{
+    return ififo_peek(fifo, fn, ctx, 0);
+}
+
+apr_status_t h2_ififo_remove(h2_ififo *fifo, int id)
+{
+    apr_status_t rv;
+    
+    if (fifo->aborted) {
+        return APR_EOF;
+    }
+
+    if ((rv = apr_thread_mutex_lock(fifo->lock)) == APR_SUCCESS) {
+        int i, rc;
+        int e;
+        
+        rc = 0;
+        for (i = 0; i < fifo->count; ++i) {
+            e = fifo->elems[inth_index(fifo, i)];
+            if (e == id) {
+                ++rc;
+            }
+            else if (rc) {
+                fifo->elems[inth_index(fifo, i-rc)] = e;
+            }
+        }
+        if (rc) {
+            fifo->count -= rc;
+            if (fifo->count + rc == fifo->nelems) {
+                apr_thread_cond_broadcast(fifo->not_full);
+            }
+            rv = APR_SUCCESS;
+        }
+        else {
+            rv = APR_EAGAIN;
+        }
+        
+        apr_thread_mutex_unlock(fifo->lock);
+    }
+    return rv;
+}
 
 /*******************************************************************************
  * h2_util for apt_table_t
diff --git a/modules/http2/h2_util.h b/modules/http2/h2_util.h
index 3516371..b2c25f6 100644
--- a/modules/http2/h2_util.h
+++ b/modules/http2/h2_util.h
@@ -185,7 +185,7 @@ size_t h2_iq_mshift(h2_iqueue *q, int *pint, size_t max);
 int h2_iq_contains(h2_iqueue *q, int sid);
 
 /*******************************************************************************
- * FIFO queue
+ * FIFO queue (void* elements)
  ******************************************************************************/
 
 /**
@@ -256,6 +256,72 @@ apr_status_t h2_fifo_try_peek(h2_fifo *fifo, h2_fifo_peek_fn *fn, void *ctx);
 apr_status_t h2_fifo_remove(h2_fifo *fifo, void *elem);
 
 /*******************************************************************************
+ * iFIFO queue (int elements)
+ ******************************************************************************/
+
+/**
+ * A thread-safe FIFO queue with some extra bells and whistles, if you
+ * do not need anything special, better use 'apr_queue'.
+ */
+typedef struct h2_ififo h2_ififo;
+
+/**
+ * Create a FIFO queue that can hold up to capacity int. ints can
+ * appear several times.
+ */
+apr_status_t h2_ififo_create(h2_ififo **pfifo, apr_pool_t *pool, int capacity);
+
+/**
+ * Create a FIFO set that can hold up to capacity integers. Ints only
+ * appear once. Pushing an int already present does not change the
+ * queue and is successful.
+ */
+apr_status_t h2_ififo_set_create(h2_ififo **pfifo, apr_pool_t *pool, int capacity);
+
+apr_status_t h2_ififo_term(h2_ififo *fifo);
+apr_status_t h2_ififo_interrupt(h2_ififo *fifo);
+
+int h2_ififo_count(h2_ififo *fifo);
+
+/**
+ * Push an int into the queue. Blocks if there is no capacity left.
+ * 
+ * @param fifo the FIFO queue
+ * @param id  the int to push
+ * @return APR_SUCCESS on push, APR_EAGAIN on try_push on a full queue,
+ *         APR_EEXIST when in set mode and elem already there.
+ */
+apr_status_t h2_ififo_push(h2_ififo *fifo, int id);
+apr_status_t h2_ififo_try_push(h2_ififo *fifo, int id);
+
+apr_status_t h2_ififo_pull(h2_ififo *fifo, int *pi);
+apr_status_t h2_ififo_try_pull(h2_ififo *fifo, int *pi);
+
+typedef h2_fifo_op_t h2_ififo_peek_fn(int head, void *ctx);
+
+/**
+ * Call given function on the head of the queue, once it exists, and
+ * perform the returned operation on it. The queue will hold its lock during
+ * this time, so no other operations on the queue are possible.
+ * @param fifo the queue to peek at
+ * @param fn   the function to call on the head, once available
+ * @param ctx  context to pass in call to function
+ */
+apr_status_t h2_ififo_peek(h2_ififo *fifo, h2_ififo_peek_fn *fn, void *ctx);
+
+/**
+ * Non-blocking version of h2_fifo_peek.
+ */
+apr_status_t h2_ififo_try_peek(h2_ififo *fifo, h2_ififo_peek_fn *fn, void *ctx);
+
+/**
+ * Remove the integer from the queue, will remove multiple appearances.
+ * @param id  the integer to remove
+ * @return APR_SUCCESS iff > 0 ints were removed, APR_EAGAIN otherwise.
+ */
+apr_status_t h2_ififo_remove(h2_ififo *fifo, int id);
+
+/*******************************************************************************
  * common helpers
  ******************************************************************************/
 /* h2_log2(n) iff n is a power of 2 */
diff --git a/modules/http2/h2_version.h b/modules/http2/h2_version.h
index 4e437f6..ca0a13a 100644
--- a/modules/http2/h2_version.h
+++ b/modules/http2/h2_version.h
@@ -26,7 +26,7 @@
  * @macro
  * Version number of the http2 module as c string
  */
-#define MOD_HTTP2_VERSION "1.10.6"
+#define MOD_HTTP2_VERSION "1.10.7"
 
 /**
  * @macro
diff --git a/modules/http2/h2_workers.c b/modules/http2/h2_workers.c
index 0bbb652..5abddd4 100644
--- a/modules/http2/h2_workers.c
+++ b/modules/http2/h2_workers.c
@@ -150,15 +150,16 @@ static void cleanup_zombies(h2_workers *workers)
 
 static apr_status_t slot_pull_task(h2_slot *slot, h2_mplx *m)
 {
-    int has_more;
-    slot->task = h2_mplx_pop_task(m, &has_more);
+    apr_status_t rv;
+    
+    rv = h2_mplx_pop_task(m, &slot->task);
     if (slot->task) {
         /* Ok, we got something to give back to the worker for execution. 
          * If we still have idle workers, we let the worker be sticky, 
          * e.g. making it poll the task's h2_mplx instance for more work 
          * before asking back here. */
         slot->sticks = slot->workers->max_workers;
-        return has_more? APR_EAGAIN : APR_SUCCESS;            
+        return rv;            
     }
     slot->sticks = 0;
     return APR_EOF;
diff --git a/modules/http2/mod_http2.c b/modules/http2/mod_http2.c
index ea399c9..420e74c 100644
--- a/modules/http2/mod_http2.c
+++ b/modules/http2/mod_http2.c
@@ -65,6 +65,7 @@ typedef struct {
 } features;
 
 static features myfeats;
+static int mpm_warned;
 
 /* The module initialization. Called once as apache hook, before any multi
  * processing (threaded or not) happens. It is typically at least called twice, 
@@ -141,6 +142,17 @@ static int h2_post_config(apr_pool_t *p, apr_pool_t *plog,
             break;
     }
     
+    if (!h2_mpm_supported() && !mpm_warned) {
+        mpm_warned = 1;
+        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(10034)
+                     "The mpm module (%s) is not supported by mod_http2. The mpm determines "
+                     "how things are processed in your server. HTTP/2 has more demands in "
+                     "this regard and the currently selected mpm will just not do. "
+                     "This is an advisory warning. Your server will continue to work, but "
+                     "the HTTP/2 protocol will be inactive.", 
+                     h2_conn_mpm_name());
+    }
+    
     status = h2_h2_init(p, s);
     if (status == APR_SUCCESS) {
         status = h2_switch_init(p, s);
diff --git a/modules/lua/README b/modules/lua/README
index c8cacb4..e0106e8 100644
--- a/modules/lua/README
+++ b/modules/lua/README
@@ -23,6 +23,9 @@
 ** TODO: document or remove block sections
 ** TODO: test per-dir behavior of block sections
 ** TODO: Suppress internal details (fs path to scripts, etc) in error responses
+** TODO: Check whether we can tighten the mode flag in lua_load(),
+         luaL_loadfile() an dluaL_loadbuffer() from NULL (="bt")
+         to e.g. "t".
     
 * License
   Apache License, Version 2.0,
diff --git a/modules/lua/config.m4 b/modules/lua/config.m4
index 1c20bee..73d4f8a 100644
--- a/modules/lua/config.m4
+++ b/modules/lua/config.m4
@@ -12,47 +12,19 @@ AC_DEFUN([CHECK_LUA_PATH], [dnl
     AC_MSG_CHECKING([for lua.h in $1/$2])
     if test -f $1/$2/lua.h; then
         AC_MSG_RESULT([yes])
-
         save_CFLAGS=$CFLAGS
         save_LDFLAGS=$LDFLAGS
-        save_LIBS=$LIBS
-
         CFLAGS="$CFLAGS"
         LDFLAGS="-L$1/$3 $LDFLAGS $lib_m"
-
         AC_CHECK_LIB($4, luaL_newstate, [
-            dnl mod_lua relies on some compatibility APIs to function.
-            AC_MSG_CHECKING([for luaL_register in -l$4])
-            CFLAGS="$CFLAGS -I$1/$2"
-            LIBS="-l$4"
-            AC_LINK_IFELSE([
-                AC_LANG_PROGRAM([[
-                    #define LUA_COMPAT_ALL
-                    #define LUA_COMPAT_5_2
-                    #define LUA_COMPAT_5_1
-                    #define LUA_COMPAT_MODULE
-
-                    #include <lua.h>
-                    #include <lauxlib.h>
-                ]], [[
-                    /* This isn't a valid call, but we're testing linkability */
-                    luaL_register(NULL, NULL, NULL);
-                ]])
-            ], [
-                AC_MSG_RESULT([yes])
-                LUA_LIBS="-L$1/$3 -l$4 $lib_m"
-                if test "x$ap_platform_runtime_link_flag" != "x"; then
-                   APR_ADDTO(LUA_LIBS, [$ap_platform_runtime_link_flag$1/$3])
-                fi
-                LUA_CFLAGS="-I$1/$2"
-            ], [
-                AC_MSG_RESULT([no])
-            ])
+            LUA_LIBS="-L$1/$3 -l$4 $lib_m"
+            if test "x$ap_platform_runtime_link_flag" != "x"; then
+               APR_ADDTO(LUA_LIBS, [$ap_platform_runtime_link_flag$1/$3])
+            fi
+            LUA_CFLAGS="-I$1/$2"
         ])
-
         CFLAGS=$save_CFLAGS
         LDFLAGS=$save_LDFLAGS
-        LIBS=$save_LIBS
 
         if test -n "${LUA_LIBS}"; then
             break
diff --git a/modules/lua/lua_apr.c b/modules/lua/lua_apr.c
index fd3ba20..8e34cf3 100644
--- a/modules/lua/lua_apr.c
+++ b/modules/lua/lua_apr.c
@@ -82,7 +82,11 @@ static const luaL_Reg lua_table_methods[] = {
 int ap_lua_init(lua_State *L, apr_pool_t *p)
 {
     luaL_newmetatable(L, "Apr.Table");
+#if LUA_VERSION_NUM < 502
     luaL_register(L, "apr_table", lua_table_methods);
+#else
+    luaL_newlib(L, lua_table_methods);
+#endif
     lua_pushstring(L, "__index");
     lua_pushstring(L, "get");
     lua_gettable(L, 2);
diff --git a/modules/lua/lua_config.c b/modules/lua/lua_config.c
index bc09bdc..14674a9 100644
--- a/modules/lua/lua_config.c
+++ b/modules/lua/lua_config.c
@@ -265,13 +265,13 @@ void ap_lua_load_config_lmodule(lua_State *L)
     lua_pushvalue(L, -1);
 
     lua_setfield(L, -2, "__index");
-    luaL_register(L, NULL, cfg_methods);        /* [metatable] */
+    luaL_setfuncs_compat(L, cfg_methods);       /* [metatable] */
 
 
     luaL_newmetatable(L, "Apache2.CommandParameters");
     lua_pushvalue(L, -1);
 
     lua_setfield(L, -2, "__index");
-    luaL_register(L, NULL, cmd_methods);        /* [metatable] */
+    luaL_setfuncs_compat(L, cmd_methods);       /* [metatable] */
 
 }
diff --git a/modules/lua/lua_request.c b/modules/lua/lua_request.c
index 4cb4fd0..f9f9ae6 100644
--- a/modules/lua/lua_request.c
+++ b/modules/lua/lua_request.c
@@ -345,7 +345,7 @@ static int req_parsebody(lua_State *L)
     char *multipart;
     const char *contentType;
     request_rec *r = ap_lua_check_request_rec(L, 1);
-    max_post_size = (apr_size_t) luaL_optint(L, 2, MAX_STRING_LEN);
+    max_post_size = (apr_size_t) luaL_optinteger(L, 2, MAX_STRING_LEN);
     multipart = apr_pcalloc(r->pool, 256);
     contentType = apr_table_get(r->headers_in, "Content-Type");
     lua_newtable(L);
@@ -418,7 +418,7 @@ static int lua_ap_requestbody(lua_State *L)
     
     r = ap_lua_check_request_rec(L, 1);
     filename = luaL_optstring(L, 2, 0);
-    maxSize = luaL_optint(L, 3, 0);
+    maxSize = (apr_off_t)luaL_optinteger(L, 3, 0);
 
     if (r) {
         apr_off_t size;
@@ -1708,7 +1708,7 @@ static int lua_ap_make_etag(lua_State *L)
     luaL_checktype(L, 1, LUA_TUSERDATA);
     r = ap_lua_check_request_rec(L, 1);
     luaL_checktype(L, 2, LUA_TBOOLEAN);
-    force_weak = luaL_optint(L, 2, 0);
+    force_weak = (int)luaL_optinteger(L, 2, 0);
     returnValue = ap_make_etag(r, force_weak);
     lua_pushstring(L, returnValue);
     return 1;
@@ -2040,7 +2040,7 @@ static int lua_set_cookie(lua_State *L)
         /* expiry */
         lua_pushstring(L, "expires");
         lua_gettable(L, -2);
-        expires = luaL_optint(L, -1, 0);
+        expires = (int)luaL_optinteger(L, -1, 0);
         lua_pop(L, 1);
         
         /* secure */
@@ -2955,27 +2955,27 @@ void ap_lua_load_request_lmodule(lua_State *L, apr_pool_t *p)
     lua_pushlightuserdata(L, dispatch);
     lua_setfield(L, LUA_REGISTRYINDEX, "Apache2.Request.dispatch");
 
-    luaL_newmetatable(L, "Apache2.Request");    /* [metatable] */
+    luaL_newmetatable(L, "Apache2.Request");     /* [metatable] */
     lua_pushvalue(L, -1);
 
     lua_setfield(L, -2, "__index");
-    luaL_register(L, NULL, request_methods);    /* [metatable] */
+    luaL_setfuncs_compat(L, request_methods);    /* [metatable] */
 
     lua_pop(L, 2);
 
-    luaL_newmetatable(L, "Apache2.Connection"); /* [metatable] */
+    luaL_newmetatable(L, "Apache2.Connection");  /* [metatable] */
     lua_pushvalue(L, -1);
 
     lua_setfield(L, -2, "__index");
-    luaL_register(L, NULL, connection_methods); /* [metatable] */
+    luaL_setfuncs_compat(L, connection_methods); /* [metatable] */
 
     lua_pop(L, 2);
 
-    luaL_newmetatable(L, "Apache2.Server");     /* [metatable] */
+    luaL_newmetatable(L, "Apache2.Server");      /* [metatable] */
     lua_pushvalue(L, -1);
 
     lua_setfield(L, -2, "__index");
-    luaL_register(L, NULL, server_methods);     /* [metatable] */
+    luaL_setfuncs_compat(L, server_methods);     /* [metatable] */
 
     lua_pop(L, 2);
 
diff --git a/modules/lua/mod_lua.c b/modules/lua/mod_lua.c
index 46e71f3..6d79199 100644
--- a/modules/lua/mod_lua.c
+++ b/modules/lua/mod_lua.c
@@ -1080,13 +1080,9 @@ static const char *register_named_block_function_hook(const char *name,
         else {
             luaL_Buffer b;
             luaL_buffinit(lvm, &b);
-#if LUA_VERSION_NUM >= 503
-            lua_dump(lvm, ldump_writer, &b, 0);
-#else
             lua_dump(lvm, ldump_writer, &b);
-#endif
             luaL_pushresult(&b);
-            spec->bytecode_len = lua_strlen(lvm, -1);
+            spec->bytecode_len = lua_rawlen(lvm, -1);
             spec->bytecode = apr_pstrmemdup(cmd->pool, lua_tostring(lvm, -1),
                                             spec->bytecode_len);
             lua_close(lvm);
diff --git a/modules/lua/mod_lua.h b/modules/lua/mod_lua.h
index cd2025b..0e49cdc 100644
--- a/modules/lua/mod_lua.h
+++ b/modules/lua/mod_lua.h
@@ -41,23 +41,21 @@
 #include "apr_hooks.h"
 #include "apr_reslist.h"
 
-/* Allow for Lua 5.2 backwards compatibility */
-#define LUA_COMPAT_ALL
-/* Allow for Lua 5.3 backwards compatibility */
-#define LUA_COMPAT_5_2
-#define LUA_COMPAT_5_1
-#define LUA_COMPAT_MODULE
-
 #include "lua.h"
 #include "lauxlib.h"
 #include "lualib.h"
 
 #if LUA_VERSION_NUM > 501
 /* Load mode for lua_load() */
-#define lua_load(a,b,c,d) lua_load(a,b,c,d,NULL)
-#define lua_resume(a,b)   lua_resume(a, NULL, b)
+#define lua_load(a,b,c,d)  lua_load(a,b,c,d,NULL)
+#define lua_resume(a,b)    lua_resume(a, NULL, b)
+#define luaL_setfuncs_compat(a,b) luaL_setfuncs(a,b,0)
 #else
-#define lua_rawlen(L,i)   lua_objlen(L, (i))
+#define lua_rawlen(L,i)    lua_objlen(L, (i))
+#define luaL_setfuncs_compat(a,b) luaL_register(a,NULL,b)
+#endif
+#if LUA_VERSION_NUM > 502
+#define lua_dump(a,b,c) lua_dump(a,b,c,0)
 #endif
 
 /* Create a set of AP_LUA_DECLARE(type), AP_LUA_DECLARE_NONSTD(type) and
diff --git a/modules/mappers/mod_negotiation.c b/modules/mappers/mod_negotiation.c
index b008f5c..1b301fb 100644
--- a/modules/mappers/mod_negotiation.c
+++ b/modules/mappers/mod_negotiation.c
@@ -1332,14 +1332,19 @@ static int mime_match(accept_rec *accept_r, var_rec *avail)
     const char *avail_type = avail->mime_type;
     int len = strlen(accept_type);
 
-    if (accept_type[0] == '*') {        /* Anything matches star/star */
+    if ((len == 1 && accept_type[0] == '*')
+            || (len == 3 && !strncmp(accept_type, "*/*", 3))) {
+        /* Anything matches star or star/star */
         if (avail->mime_stars < 1) {
             avail->mime_stars = 1;
         }
         return 1;
     }
-    else if ((accept_type[len - 1] == '*') &&
-             !strncmp(accept_type, avail_type, len - 2)) {
+    else if (len > 2 && accept_type[len - 2] == '/'
+                     && accept_type[len - 1] == '*'
+                     && !strncmp(accept_type, avail_type, len - 2)
+                     && avail_type[len - 2] == '/') {
+        /* Any subtype matches for type/star */
         if (avail->mime_stars < 2) {
             avail->mime_stars = 2;
         }
diff --git a/modules/proxy/mod_proxy_fcgi.c b/modules/proxy/mod_proxy_fcgi.c
index a268556..41292e8 100644
--- a/modules/proxy/mod_proxy_fcgi.c
+++ b/modules/proxy/mod_proxy_fcgi.c
@@ -321,7 +321,6 @@ static apr_status_t send_environment(proxy_conn_rec *conn, request_rec *r,
     apr_status_t rv;
     apr_size_t avail_len, len, required_len;
     int next_elem, starting_elem;
-    int fpm = 0;
     fcgi_req_config_t *rconf = ap_get_module_config(r->request_config, &proxy_fcgi_module);
     fcgi_dirconf_t *dconf = ap_get_module_config(r->per_dir_config, &proxy_fcgi_module);
 
@@ -354,8 +353,6 @@ static apr_status_t send_environment(proxy_conn_rec *conn, request_rec *r,
                     *qs = '\0';
                 }
             }
-        } else {
-            fpm = 1;
         }
 
         if (newfname) {
@@ -364,38 +361,9 @@ static apr_status_t send_environment(proxy_conn_rec *conn, request_rec *r,
         }
     }
 
-#if 0
-    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(09999)
-                  "r->filename: %s", (r->filename ? r->filename : "nil"));
-    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(09999)
-                  "r->uri: %s", (r->uri ? r->uri : "nil"));
-    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(09999)
-                  "r->path_info: %s", (r->path_info ? r->path_info : "nil"));
-#endif
-
     ap_add_common_vars(r);
     ap_add_cgi_vars(r);
 
-    if (fpm || apr_table_get(r->notes, "virtual_script")) {
-        /*
-         * Adjust SCRIPT_NAME, PATH_INFO and PATH_TRANSLATED for PHP-FPM
-         * TODO: Right now, PATH_INFO and PATH_TRANSLATED look OK...
-         */
-        const char *pend;
-        const char *script_name = apr_table_get(r->subprocess_env, "SCRIPT_NAME");
-        pend = script_name + strlen(script_name);
-        if (r->path_info && *r->path_info) {
-            pend = script_name + ap_find_path_info(script_name, r->path_info) - 1;
-        }
-        while (pend != script_name && *pend != '/') {
-            pend--;
-        }
-        apr_table_setn(r->subprocess_env, "SCRIPT_NAME", pend);
-        ap_log_rerror(APLOG_MARK, APLOG_TRACE4, 0, r,
-                      "fpm:virtual_script: Modified SCRIPT_NAME to: %s",
-                      pend);
-    }
-
     /* XXX are there any FastCGI specific env vars we need to send? */
 
     /* Give admins final option to fine-tune env vars */
diff --git a/server/protocol.c b/server/protocol.c
index ff44b39..edf3ed9 100644
--- a/server/protocol.c
+++ b/server/protocol.c
@@ -1088,8 +1088,12 @@ AP_DECLARE(void) ap_get_mime_headers_core(request_rec *r, apr_bucket_brigade *bb
                     return;
                 }
 
-                /* last character of field-name */
-                tmp_field = value - (value > last_field ? 1 : 0);
+                if (value == last_field) {
+                    r->status = HTTP_BAD_REQUEST;
+                    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03453)
+                                  "Request header field name was empty");
+                    return;
+                }
 
                 *value++ = '\0'; /* NUL-terminate at colon */
 
@@ -1112,13 +1116,6 @@ AP_DECLARE(void) ap_get_mime_headers_core(request_rec *r, apr_bucket_brigade *bb
                                   " bad whitespace");
                     return;
                 }
-
-                if (tmp_field == last_field) {
-                    r->status = HTTP_BAD_REQUEST;
-                    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03453)
-                                  "Request header field name was empty");
-                    return;
-                }
             }
             else /* Using strict RFC7230 parsing */
             {
diff --git a/server/request.c b/server/request.c
index fac5f8c..7cead3b 100644
--- a/server/request.c
+++ b/server/request.c
@@ -1615,9 +1615,6 @@ AP_DECLARE(int) ap_file_walk(request_rec *r)
         return OK;
     }
 
-    cache = prep_walk_cache(AP_NOTE_FILE_WALK, r);
-    cached = (cache->cached != NULL);
-
     /* No tricks here, there are just no <Files > to parse in this context.
      * We won't destroy the cache, just in case _this_ redirect is later
      * redirected again to a context containing the same or similar <Files >.
@@ -1626,6 +1623,9 @@ AP_DECLARE(int) ap_file_walk(request_rec *r)
         return OK;
     }
 
+    cache = prep_walk_cache(AP_NOTE_FILE_WALK, r);
+    cached = (cache->cached != NULL);
+
     /* Get the basename .. and copy for the cache just
      * in case r->filename is munged by another module
      */
diff --git a/support/htdigest.c b/support/htdigest.c
index 972fa82..018c0ea 100644
--- a/support/htdigest.c
+++ b/support/htdigest.c
@@ -282,7 +282,7 @@ int main(int argc, const char * const argv[])
 
     /* The temporary file has all the data, just copy it to the new location.
      */
-    if (apr_file_copy(dirname, argv[1], APR_FILE_SOURCE_PERMS, cntxt) !=
+    if (apr_file_copy(dirname, argv[1], APR_OS_DEFAULT, cntxt) !=
                 APR_SUCCESS) {
         apr_file_printf(errfile, "%s: unable to update file %s\n",
                         argv[0], argv[1]);
diff --git a/support/htpasswd.c b/support/htpasswd.c
index 1102349..93308d8 100644
--- a/support/htpasswd.c
+++ b/support/htpasswd.c
@@ -498,7 +498,7 @@ int main(int argc, const char * const argv[])
 
     /* The temporary file has all the data, just copy it to the new location.
      */
-    if (apr_file_copy(dirname, pwfilename, APR_FILE_SOURCE_PERMS, pool) !=
+    if (apr_file_copy(dirname, pwfilename, APR_OS_DEFAULT, pool) !=
         APR_SUCCESS) {
         apr_file_printf(errfile, "%s: unable to update file %s" NL,
                         argv[0], pwfilename);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-apache/apache2.git



More information about the Pkg-apache-commits mailing list