Author: glen                         Date: Mon Jan 19 10:06:20 2009 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- update to 2371:
  - Fix fastcgi-authorizer handling; Status: 200 is now accepted as the doc 
requests
  - Compare address family in inet_ntop_cache
  - Revert CVE-2008-4359 (#1720) fix "encoding+simplifying urls for 
rewrite/redirect": too many regressions.
  - Use FD_CLOEXEC if possible (fixes #1821)
  - Optimized buffer usage in mod_proxy (fixes #1850)
  - Fix uninitialized value in time struct after strptime

---- Files affected:
SOURCES:
   lighttpd-branch.diff (1.42 -> 1.43) 

---- Diffs:

================================================================
Index: SOURCES/lighttpd-branch.diff
diff -u SOURCES/lighttpd-branch.diff:1.42 SOURCES/lighttpd-branch.diff:1.43
--- SOURCES/lighttpd-branch.diff:1.42   Tue Oct  7 18:16:14 2008
+++ SOURCES/lighttpd-branch.diff        Mon Jan 19 11:06:14 2009
@@ -1,9 +1,57 @@
+Index: cmake/LighttpdMacros.cmake
+===================================================================
+--- cmake/LighttpdMacros.cmake (.../tags/lighttpd-1.4.20)      (revision 0)
++++ cmake/LighttpdMacros.cmake (.../branches/lighttpd-1.4.x)   (revision 2371)
+@@ -0,0 +1,43 @@
++## our modules are without the "lib" prefix
++
++MACRO(ADD_AND_INSTALL_LIBRARY LIBNAME SRCFILES)
++  IF(BUILD_STATIC)
++    ADD_LIBRARY(${LIBNAME} STATIC ${SRCFILES})
++    TARGET_LINK_LIBRARIES(lighttpd ${LIBNAME})
++  ELSE(BUILD_STATIC)
++    ADD_LIBRARY(${LIBNAME} SHARED ${SRCFILES})
++    SET(L_INSTALL_TARGETS ${L_INSTALL_TARGETS} ${LIBNAME})
++    ## Windows likes to link it this way back to app!
++    IF(WIN32)
++        SET_TARGET_PROPERTIES(${LIBNAME} PROPERTIES LINK_FLAGS lighttpd.lib)
++    ENDIF(WIN32)
++
++    IF(APPLE)
++        SET_TARGET_PROPERTIES(${LIBNAME} PROPERTIES LINK_FLAGS 
"-flat_namespace -undefined suppress")
++    ENDIF(APPLE)
++  ENDIF(BUILD_STATIC)
++ENDMACRO(ADD_AND_INSTALL_LIBRARY)
++
++MACRO(LEMON_PARSER SRCFILE)
++  GET_FILENAME_COMPONENT(SRCBASE ${SRCFILE} NAME_WE)
++  ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${SRCBASE}.c 
${CMAKE_CURRENT_BINARY_DIR}/${SRCBASE}.h
++  COMMAND ${CMAKE_BINARY_DIR}/build/lemon
++  ARGS -q ${CMAKE_CURRENT_SOURCE_DIR}/${SRCFILE} 
${CMAKE_SOURCE_DIR}/src/lempar.c
++    DEPENDS ${CMAKE_BINARY_DIR}/build/lemon 
${CMAKE_CURRENT_SOURCE_DIR}/${SRCFILE} ${CMAKE_SOURCE_DIR}/src/lempar.c
++  COMMENT "Generating ${SRCBASE}.c from ${SRCFILE}"
++)
++ENDMACRO(LEMON_PARSER)
++
++MACRO(ADD_TARGET_PROPERTIES _target _name)
++  SET(_properties)
++  FOREACH(_prop ${ARGN})
++    SET(_properties "${_properties} ${_prop}")
++  ENDFOREACH(_prop)
++  GET_TARGET_PROPERTY(_old_properties ${_target} ${_name})
++  MESSAGE("adding property to ${_target} ${_name}:" ${_properties})
++  IF(NOT _old_properties)
++    # in case it's NOTFOUND
++    SET(_old_properties)
++  ENDIF(NOT _old_properties)
++  SET_TARGET_PROPERTIES(${_target} PROPERTIES ${_name} "${_old_properties} 
${_properties}")
++ENDMACRO(ADD_TARGET_PROPERTIES)
 Index: configure.in
 ===================================================================
 Index: src/configfile-glue.c
 ===================================================================
---- src/configfile-glue.c      (.../tags/lighttpd-1.4.20)      (revision 2336)
-+++ src/configfile-glue.c      (.../branches/lighttpd-1.4.x)   (revision 2336)
+--- src/configfile-glue.c      (.../tags/lighttpd-1.4.20)      (revision 2371)
++++ src/configfile-glue.c      (.../branches/lighttpd-1.4.x)   (revision 2371)
 @@ -1,4 +1,5 @@
  #include <string.h>
 +#include <stdlib.h>
@@ -35,8 +83,8 @@
                                return -1;
 Index: src/mod_cgi.c
 ===================================================================
---- src/mod_cgi.c      (.../tags/lighttpd-1.4.20)      (revision 2336)
-+++ src/mod_cgi.c      (.../branches/lighttpd-1.4.x)   (revision 2336)
+--- src/mod_cgi.c      (.../tags/lighttpd-1.4.20)      (revision 2371)
++++ src/mod_cgi.c      (.../branches/lighttpd-1.4.x)   (revision 2371)
 @@ -822,15 +822,27 @@
                        );
                cgi_env_add(&env, CONST_STR_LEN("SERVER_PORT"), buf, 
strlen(buf));
@@ -105,10 +153,27 @@
                cgi_env_add(&env, CONST_STR_LEN("REMOTE_ADDR"), s, strlen(s));
  
                LI_ltostr(buf,
+Index: src/mod_rewrite.c
+===================================================================
+--- src/mod_rewrite.c  (.../tags/lighttpd-1.4.20)      (revision 2371)
++++ src/mod_rewrite.c  (.../branches/lighttpd-1.4.x)   (revision 2371)
+@@ -350,11 +350,7 @@
+ 
+       if (!p->conf.rewrite) return HANDLER_GO_ON;
+ 
+-      buffer_copy_string_buffer(p->match_buf, con->uri.path);
+-      if (con->uri.query->used > 0) {
+-              buffer_append_string_len(p->match_buf, CONST_STR_LEN("?"));
+-              buffer_append_string_buffer(p->match_buf, con->uri.query);
+-      }
++      buffer_copy_string_buffer(p->match_buf, con->request.uri);
+ 
+       for (i = 0; i < p->conf.rewrite->used; i++) {
+               pcre *match;
 Index: src/connections.c
 ===================================================================
---- src/connections.c  (.../tags/lighttpd-1.4.20)      (revision 2336)
-+++ src/connections.c  (.../branches/lighttpd-1.4.x)   (revision 2336)
+--- src/connections.c  (.../tags/lighttpd-1.4.20)      (revision 2371)
++++ src/connections.c  (.../branches/lighttpd-1.4.x)   (revision 2371)
 @@ -330,15 +330,13 @@
        buffer_prepare_copy(b, 4 * 1024);
        len = recv(con->fd, b->ptr, b->size - 1, 0);
@@ -131,10 +196,36 @@
        len = read(con->fd, b->ptr, b->size - 1);
  #endif
  
+@@ -1066,6 +1064,9 @@
+                                               if (dst_c->file.fd == -1) {
+                                                       /* this should not 
happen as we cache the fd, but you never know */
+                                                       dst_c->file.fd = 
open(dst_c->file.name->ptr, O_WRONLY | O_APPEND);
++#ifdef FD_CLOEXEC
++                                                      fcntl(dst_c->file.fd, 
F_SETFD, FD_CLOEXEC);
++#endif
+                                               }
+                                       } else {
+                                               /* the chunk is too large now, 
close it */
+Index: src/mod_alias.c
+===================================================================
+--- src/mod_alias.c    (.../tags/lighttpd-1.4.20)      (revision 2371)
++++ src/mod_alias.c    (.../branches/lighttpd-1.4.x)   (revision 2371)
+@@ -103,9 +103,8 @@
+                                       }
+                                       /* ok, they have same prefix. check 
position */
+                                       if (a->sorted[j] < a->sorted[k]) {
+-                                              fprintf(stderr, "url.alias: 
`%s' will never match as `%s' matched first\n",
+-                                                              key->ptr,
+-                                                              prefix->ptr);
++                                              log_error_write(srv, __FILE__, 
__LINE__, "SBSBS",
++                                                      "url.alias: `", key, "' 
will never match as `", prefix, "' matched first");
+                                               return HANDLER_ERROR;
+                                       }
+                               }
 Index: src/configfile.c
 ===================================================================
---- src/configfile.c   (.../tags/lighttpd-1.4.20)      (revision 2336)
-+++ src/configfile.c   (.../branches/lighttpd-1.4.x)   (revision 2336)
+--- src/configfile.c   (.../tags/lighttpd-1.4.20)      (revision 2371)
++++ src/configfile.c   (.../branches/lighttpd-1.4.x)   (revision 2371)
 @@ -940,7 +940,6 @@
  }
  
@@ -152,10 +243,105 @@
                log_error_write(srv, __FILE__, __LINE__, "sbss",
                                "opening", source, "failed:", strerror(errno));
                ret = -1;
+Index: src/mod_trigger_b4_dl.c
+===================================================================
+--- src/mod_trigger_b4_dl.c    (.../tags/lighttpd-1.4.20)      (revision 2371)
++++ src/mod_trigger_b4_dl.c    (.../branches/lighttpd-1.4.x)   (revision 2371)
+@@ -1,5 +1,6 @@
+ #include <ctype.h>
+ #include <stdlib.h>
++#include <fcntl.h>
+ #include <string.h>
+ 
+ #include "base.h"
+@@ -180,6 +181,9 @@
+                                               "gdbm-open failed");
+                               return HANDLER_ERROR;
+                       }
++#ifdef FD_CLOEXEC
++                      fcntl(gdbm_fdesc(s->db), F_SETFD, FD_CLOEXEC);
++#endif
+               }
+ #endif
+ #if defined(HAVE_PCRE_H)
+Index: src/mod_mysql_vhost.c
+===================================================================
+--- src/mod_mysql_vhost.c      (.../tags/lighttpd-1.4.20)      (revision 2371)
++++ src/mod_mysql_vhost.c      (.../branches/lighttpd-1.4.x)   (revision 2371)
+@@ -245,7 +245,6 @@
+               if (!(buffer_is_empty(s->myuser) ||
+                     buffer_is_empty(s->mydb))) {
+                       my_bool reconnect = 1;
+-                      int fd;
+ 
+                       if (NULL == (s->mysql = mysql_init(NULL))) {
+                               log_error_write(srv, __FILE__, __LINE__, "s", 
"mysql_init() failed, exiting...");
+@@ -267,19 +266,27 @@
+                               return HANDLER_ERROR;
+                       }
+ #undef FOO
++
++#if 0
+                       /* set close_on_exec for mysql the hard way */
+                       /* Note: this only works as it is done during startup, 
*/
+                       /* otherwise we cannot be sure that mysql is fd i-1 */
+-                      if (-1 == (fd = open("/dev/null", 0))) {
++                      { int fd;
++                      if (-1 != (fd = open("/dev/null", 0))) {
+                               close(fd);
++#ifdef FD_CLOEXEC
+                               fcntl(fd-1, F_SETFD, FD_CLOEXEC);
+-                      }
++#endif
++                      } }
++#else
++#ifdef FD_CLOEXEC
++                      fcntl(s->mysql->net.fd, F_SETFD, FD_CLOEXEC);
++#endif
++#endif
+               }
+       }
+ 
+-
+-
+-        return HANDLER_GO_ON;
++      return HANDLER_GO_ON;
+ }
+ 
+ #define PATCH(x) \
+Index: src/inet_ntop_cache.c
+===================================================================
+--- src/inet_ntop_cache.c      (.../tags/lighttpd-1.4.20)      (revision 2371)
++++ src/inet_ntop_cache.c      (.../branches/lighttpd-1.4.x)   (revision 2371)
+@@ -11,7 +11,7 @@
+ #ifdef HAVE_IPV6
+       size_t ndx = 0, i;
+       for (i = 0; i < INET_NTOP_CACHE_MAX; i++) {
+-              if (srv->inet_ntop_cache[i].ts != 0) {
++              if (srv->inet_ntop_cache[i].ts != 0 && 
srv->inet_ntop_cache[i].family == addr->plain.sa_family) {
+                       if (srv->inet_ntop_cache[i].family == AF_INET6 &&
+                           0 == 
memcmp(srv->inet_ntop_cache[i].addr.ipv6.s6_addr, addr->ipv6.sin6_addr.s6_addr, 
16)) {
+                               /* IPv6 found in cache */
+Index: src/mod_rrdtool.c
+===================================================================
+--- src/mod_rrdtool.c  (.../tags/lighttpd-1.4.20)      (revision 2371)
++++ src/mod_rrdtool.c  (.../branches/lighttpd-1.4.x)   (revision 2371)
+@@ -179,6 +179,11 @@
+               p->read_fd = from_rrdtool_fds[0];
+               p->rrdtool_pid = pid;
+ 
++#ifdef FD_CLOEXEC
++              fcntl(p->write_fd, F_SETFD, FD_CLOEXEC);
++              fcntl(p->read_fd, F_SETFD, FD_CLOEXEC);
++#endif
++
+               break;
+       }
+       }
 Index: src/response.c
 ===================================================================
---- src/response.c     (.../tags/lighttpd-1.4.20)      (revision 2336)
-+++ src/response.c     (.../branches/lighttpd-1.4.x)   (revision 2336)
+--- src/response.c     (.../tags/lighttpd-1.4.20)      (revision 2371)
++++ src/response.c     (.../branches/lighttpd-1.4.x)   (revision 2371)
 @@ -44,16 +44,15 @@
        buffer_append_string(b, get_http_status_name(con->http_status));
  
@@ -176,10 +362,79 @@
        }
  
  
+@@ -233,6 +232,27 @@
+               }
+ 
+ 
++              /**
++               *
++               * call plugins
++               *
++               * - based on the raw URL
++               *
++               */
++
++              switch(r = plugins_call_handle_uri_raw(srv, con)) {
++              case HANDLER_GO_ON:
++                      break;
++              case HANDLER_FINISHED:
++              case HANDLER_COMEBACK:
++              case HANDLER_WAIT_FOR_EVENT:
++              case HANDLER_ERROR:
++                      return r;
++              default:
++                      log_error_write(srv, __FILE__, __LINE__, "sd", 
"handle_uri_raw: unknown return value", r);
++                      break;
++              }
++
+               /* build filename
+                *
+                * - decode url-encodings  (e.g. %20 -> ' ')
+@@ -240,6 +260,7 @@
+                */
+ 
+ 
++
+               if (con->request.http_method == HTTP_METHOD_OPTIONS &&
+                   con->uri.path_raw->ptr[0] == '*' && 
con->uri.path_raw->ptr[1] == '\0') {
+                       /* OPTIONS * ... */
+@@ -255,32 +276,10 @@
+                       log_error_write(srv, __FILE__, __LINE__,  "sb", 
"URI-path     : ", con->uri.path);
+               }
+ 
+-
+               /**
+                *
+                * call plugins
+                *
+-               * - based on the raw URL
+-               *
+-               */
+-
+-              switch(r = plugins_call_handle_uri_raw(srv, con)) {
+-              case HANDLER_GO_ON:
+-                      break;
+-              case HANDLER_FINISHED:
+-              case HANDLER_COMEBACK:
+-              case HANDLER_WAIT_FOR_EVENT:
+-              case HANDLER_ERROR:
+-                      return r;
+-              default:
+-                      log_error_write(srv, __FILE__, __LINE__, "sd", 
"handle_uri_raw: unknown return value", r);
+-                      break;
+-              }
+-
+-              /**
+-               *
+-               * call plugins
+-               *
+                * - based on the clean URL
+                *
+                */
 Index: src/mod_simple_vhost.c
 ===================================================================
---- src/mod_simple_vhost.c     (.../tags/lighttpd-1.4.20)      (revision 2336)
-+++ src/mod_simple_vhost.c     (.../branches/lighttpd-1.4.x)   (revision 2336)
+--- src/mod_simple_vhost.c     (.../tags/lighttpd-1.4.20)      (revision 2371)
++++ src/mod_simple_vhost.c     (.../branches/lighttpd-1.4.x)   (revision 2371)
 @@ -249,6 +249,8 @@
                                return HANDLER_GO_ON;
                        } else {
@@ -191,8 +446,17 @@
                        buffer_copy_string_buffer(con->server_name, 
con->uri.authority);
 Index: src/mod_proxy.c
 ===================================================================
---- src/mod_proxy.c    (.../tags/lighttpd-1.4.20)      (revision 2336)
-+++ src/mod_proxy.c    (.../branches/lighttpd-1.4.x)   (revision 2336)
+--- src/mod_proxy.c    (.../tags/lighttpd-1.4.20)      (revision 2371)
++++ src/mod_proxy.c    (.../branches/lighttpd-1.4.x)   (revision 2371)
+@@ -652,7 +652,7 @@
+                       buffer_prepare_append(hctx->response, b + 1);
+                       hctx->response->used = 1;
+               } else {
+-                      buffer_prepare_append(hctx->response, 
hctx->response->used + b);
++                      buffer_prepare_append(hctx->response, b);
+               }
+ 
+               if (-1 == (r = read(hctx->fd, hctx->response->ptr + 
hctx->response->used - 1, b))) {
 @@ -1198,7 +1198,8 @@
                host = (data_proxy *)extension->value->data[0];
  
@@ -203,10 +467,165 @@
                if (ndx < 0) ndx = 0;
  
                /* Search first active host after last_used_ndx */
+Index: src/config.h.cmake
+===================================================================
+--- src/config.h.cmake (.../tags/lighttpd-1.4.20)      (revision 0)
++++ src/config.h.cmake (.../branches/lighttpd-1.4.x)   (revision 2371)
+@@ -0,0 +1,150 @@
++/*
++    CMake autogenerated config.h file. Do not edit!
++*/
++
++/* System */
++#cmakedefine  HAVE_SYS_DEVPOLL_H
++#cmakedefine  HAVE_SYS_EPOLL_H
++#cmakedefine  HAVE_SYS_EVENT_H
++#cmakedefine  HAVE_SYS_MMAN_H
++#cmakedefine  HAVE_SYS_POLL_H
++#cmakedefine  HAVE_SYS_PORT_H
++#cmakedefine  HAVE_SYS_PRCTL_H
++#cmakedefine  HAVE_SYS_RESOURCE_H
++#cmakedefine  HAVE_SYS_SENDFILE_H
++#cmakedefine  HAVE_SYS_SELECT_H
++#cmakedefine  HAVE_SYS_SYSLIMITS_H
++#cmakedefine  HAVE_SYS_TYPES_H
++#cmakedefine  HAVE_SYS_UIO_H
++#cmakedefine  HAVE_SYS_UN_H
++#cmakedefine  HAVE_SYS_WAIT_H
++#cmakedefine HAVE_SYS_TIME_H
++#cmakedefine HAVE_UNISTD_H
++#cmakedefine HAVE_PTHREAD_H
++#cmakedefine HAVE_INET_ATON
++#cmakedefine HAVE_IPV6
++
++/* XATTR */
++#cmakedefine HAVE_ATTR_ATTRIBUTES_H
++#cmakedefine HAVE_XATTR
++
++/* mySQL */
++#cmakedefine  HAVE_MYSQL_H
++#cmakedefine  HAVE_MYSQL
++
++/* OpenSSL */
++#cmakedefine  HAVE_OPENSSL_SSL_H
++#cmakedefine  HAVE_LIBCRYPTO
++#cmakedefine  OPENSSL_NO_KRB5
++#cmakedefine  HAVE_LIBSSL
++
++/* BZip */
++#cmakedefine  HAVE_BZLIB_H
++#cmakedefine  HAVE_LIBBZ2
++
++/* FAM */
++#cmakedefine  HAVE_FAM_H
++#cmakedefine  HAVE_FAMNOEXISTS
++
++/* getopt */
++#cmakedefine  HAVE_GETOPT_H
++
++#cmakedefine  HAVE_INTTYPES_H
++
++/* LDAP */
++#cmakedefine  HAVE_LDAP_H
++#cmakedefine  HAVE_LIBLDAP
++#cmakedefine  HAVE_LBER_H
++#cmakedefine  HAVE_LIBLBER
++#cmakedefine  LDAP_DEPRECATED 1
++
++/* XML */
++#cmakedefine  HAVE_LIBXML_H
++#cmakedefine  HAVE_LIBXML
++
++/* PCRE */
++#cmakedefine  HAVE_PCRE_H
++#cmakedefine  HAVE_LIBPCRE
++
++#cmakedefine  HAVE_POLL_H
++#cmakedefine  HAVE_PWD_H
++
++/* sqlite3 */
++#cmakedefine  HAVE_SQLITE3_H
++#cmakedefine  HAVE_LIBPCRE
++
++#cmakedefine  HAVE_STDDEF_H
++#cmakedefine  HAVE_STDINT_H
++#cmakedefine  HAVE_SYSLOG_H
++
++/* UUID */
++#cmakedefine  HAVE_UUID_UUID_H
++#cmakedefine  HAVE_LIBUUID
++
++/* ZLIB */
++#cmakedefine  HAVE_ZLIB_H
++#cmakedefine  HAVE_LIBZ
++
++/* lua */
++#cmakedefine  HAVE_LUA_H
++#cmakedefine  HAVE_LIBLUA
++
++/* gdbm */
++#cmakedefine  HAVE_GDBM_H
++#cmakedefine  HAVE_GDBM
++
++/* memcache */
++#cmakedefine  HAVE_MEMCACHE_H
++
++/* inotify */
++#cmakedefine  HAVE_INOTIFY_INIT
++#cmakedefine  HAVE_SYS_INOTIFY_H
++
++/* Types */
++#cmakedefine  HAVE_SOCKLEN_T
++#cmakedefine  SIZEOF_LONG ${SIZEOF_LONG}
++#cmakedefine  SIZEOF_OFF_T ${SIZEOF_OFF_T}
++
++/* Functions */
++#cmakedefine  HAVE_CHROOT
++#cmakedefine  HAVE_CRYPT
++#cmakedefine  HAVE_EPOLL_CTL
++#cmakedefine  HAVE_FORK
++#cmakedefine  HAVE_GETRLIMIT
++#cmakedefine  HAVE_GETUID
++#cmakedefine  HAVE_GMTIME_R
++#cmakedefine  HAVE_INET_NTOP
++#cmakedefine  HAVE_KQUEUE
++#cmakedefine  HAVE_LOCALTIME_R
++#cmakedefine  HAVE_LSTAT
++#cmakedefine  HAVE_MADVISE
++#cmakedefine  HAVE_MEMCPY
++#cmakedefine  HAVE_MEMSET
++#cmakedefine  HAVE_MMAP
++#cmakedefine  HAVE_PATHCONF
++#cmakedefine  HAVE_POLL
++#cmakedefine  HAVE_PORT_CREATE
++#cmakedefine  HAVE_PRCTL
++#cmakedefine  HAVE_PREAD
++#cmakedefine  HAVE_POSIX_FADVISE
++#cmakedefine  HAVE_SELECT
++#cmakedefine  HAVE_SENDFILE
++#cmakedefine  HAVE_SEND_FILE
++#cmakedefine  HAVE_SENDFILE64
++#cmakedefine  HAVE_SENDFILEV
++#cmakedefine  HAVE_SIGACTION
++#cmakedefine  HAVE_SIGNAL
++#cmakedefine  HAVE_SIGTIMEDWAIT
++#cmakedefine  HAVE_STRPTIME
++#cmakedefine  HAVE_SYSLOG
++#cmakedefine  HAVE_WRITEV
++
++/* libcrypt */
++#cmakedefine  HAVE_CRYPT_H
++#cmakedefine  HAVE_LIBCRYPT
++
++/* fastcgi */
++#cmakedefine HAVE_FASTCGI_H
++#cmakedefine HAVE_FASTCGI_FASTCGI_H
++
++#cmakedefine LIGHTTPD_STATIC
 Index: src/http_auth.c
 ===================================================================
---- src/http_auth.c    (.../tags/lighttpd-1.4.20)      (revision 2336)
-+++ src/http_auth.c    (.../branches/lighttpd-1.4.x)   (revision 2336)
+--- src/http_auth.c    (.../tags/lighttpd-1.4.20)      (revision 2371)
++++ src/http_auth.c    (.../branches/lighttpd-1.4.x)   (revision 2371)
 @@ -57,22 +57,25 @@
  
  static const char base64_pad = '=';
@@ -329,10 +748,27 @@
  
                /* 3. */
                if (NULL == (ldap = ldap_init(p->conf.auth_ldap_hostname->ptr, 
LDAP_PORT))) {
+Index: src/mod_redirect.c
+===================================================================
+--- src/mod_redirect.c (.../tags/lighttpd-1.4.20)      (revision 2371)
++++ src/mod_redirect.c (.../branches/lighttpd-1.4.x)   (revision 2371)
+@@ -178,11 +178,7 @@
+ 
+       mod_redirect_patch_connection(srv, con, p);
+ 
+-      buffer_copy_string_buffer(p->match_buf, con->uri.path);
+-      if (con->uri.query->used > 0) {
+-              buffer_append_string_len(p->match_buf, CONST_STR_LEN("?"));
+-              buffer_append_string_buffer(p->match_buf, con->uri.query);
+-      }
++      buffer_copy_string_buffer(p->match_buf, con->request.uri);
+ 
+       for (i = 0; i < p->conf.redirect->used; i++) {
+               pcre *match;
 Index: src/http_auth.h
 ===================================================================
---- src/http_auth.h    (.../tags/lighttpd-1.4.20)      (revision 2336)
-+++ src/http_auth.h    (.../branches/lighttpd-1.4.x)   (revision 2336)
+--- src/http_auth.h    (.../tags/lighttpd-1.4.20)      (revision 2371)
++++ src/http_auth.h    (.../branches/lighttpd-1.4.x)   (revision 2371)
 @@ -63,7 +63,7 @@
  
        mod_auth_plugin_config **config_storage;
@@ -342,10 +778,32 @@
  } mod_auth_plugin_data;
  
  int http_auth_basic_check(server *srv, connection *con, mod_auth_plugin_data 
*p, array *req, buffer *url, const char *realm_str);
+Index: src/mod_webdav.c
+===================================================================
+--- src/mod_webdav.c   (.../tags/lighttpd-1.4.20)      (revision 2371)
++++ src/mod_webdav.c   (.../branches/lighttpd-1.4.x)   (revision 2371)
+@@ -1026,6 +1026,8 @@
+                               if (MAP_FAILED == (c->file.mmap.start = mmap(0, 
c->file.length, PROT_READ, MAP_SHARED, c->file.fd, 0))) {
+                                       log_error_write(srv, __FILE__, 
__LINE__, "ssbd", "mmap failed: ",
+                                                       strerror(errno), 
c->file.name,  c->file.fd);
++                                      close(c->file.fd);
++                                      c->file.fd = -1;
+ 
+                                       return -1;
+                               }
+@@ -1723,6 +1725,8 @@
+                                       if (MAP_FAILED == (c->file.mmap.start = 
mmap(0, c->file.length, PROT_READ, MAP_SHARED, c->file.fd, 0))) {
+                                               log_error_write(srv, __FILE__, 
__LINE__, "ssbd", "mmap failed: ",
+                                                               
strerror(errno), c->file.name,  c->file.fd);
++                                              close(c->file.fd);
++                                              c->file.fd = -1;
+ 
+                                               return HANDLER_ERROR;
+                                       }
 Index: src/mod_compress.c
 ===================================================================
---- src/mod_compress.c (.../tags/lighttpd-1.4.20)      (revision 2336)
-+++ src/mod_compress.c (.../branches/lighttpd-1.4.x)   (revision 2336)
+--- src/mod_compress.c (.../tags/lighttpd-1.4.20)      (revision 2371)
++++ src/mod_compress.c (.../branches/lighttpd-1.4.x)   (revision 2371)
 @@ -49,6 +49,7 @@
        buffer *compress_cache_dir;
        array  *compress;
@@ -471,10 +929,42 @@
  
                                if (matched_encodings) {
                                        const char *dflt_gzip = "gzip";
+Index: src/spawn-fcgi.c
+===================================================================
+--- src/spawn-fcgi.c   (.../tags/lighttpd-1.4.20)      (revision 2371)
++++ src/spawn-fcgi.c   (.../branches/lighttpd-1.4.x)   (revision 2371)
+@@ -58,7 +58,7 @@
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/lighttpd-branch.diff?r1=1.42&r2=1.43&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to