Author: glen                         Date: Wed Feb 18 00:24:17 2009 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- up to 1.4.21 and r2399

---- Files affected:
SOURCES:
   lighttpd-branch.sh (1.6 -> 1.7) , lighttpd-branch.diff (1.45 -> 1.46) 

---- Diffs:

================================================================
Index: SOURCES/lighttpd-branch.sh
diff -u SOURCES/lighttpd-branch.sh:1.6 SOURCES/lighttpd-branch.sh:1.7
--- SOURCES/lighttpd-branch.sh:1.6      Fri Oct  3 11:49:17 2008
+++ SOURCES/lighttpd-branch.sh  Wed Feb 18 01:24:11 2009
@@ -1,7 +1,7 @@
 #!/bin/sh
 set -e
 svn=svn://svn.lighttpd.net/lighttpd
-tag=lighttpd-1.4.20
+tag=lighttpd-1.4.21
 branch=lighttpd-1.4.x
 
 old=$svn/tags/$tag

================================================================
Index: SOURCES/lighttpd-branch.diff
diff -u SOURCES/lighttpd-branch.diff:1.45 SOURCES/lighttpd-branch.diff:1.46
--- SOURCES/lighttpd-branch.diff:1.45   Fri Feb  6 03:58:08 2009
+++ SOURCES/lighttpd-branch.diff        Wed Feb 18 01:24:11 2009
@@ -1,3072 +1,90 @@
-Index: cmake/LighttpdMacros.cmake
-===================================================================
---- cmake/LighttpdMacros.cmake (.../tags/lighttpd-1.4.20)      (revision 0)
-+++ cmake/LighttpdMacros.cmake (.../branches/lighttpd-1.4.x)   (revision 2392)
-@@ -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 2392)
-+++ src/configfile-glue.c      (.../branches/lighttpd-1.4.x)   (revision 2392)
-@@ -1,4 +1,5 @@
- #include <string.h>
-+#include <stdlib.h>
- 
- #include "base.h"
- #include "buffer.h"
-@@ -90,6 +91,22 @@
-                       case TYPE_STRING: {
-                               data_string *ds = (data_string *)du;
- 
-+                              /* If the value came from an environment 
variable, then it is a
-+                               * data_string, although it may contain a 
number in ASCII
-+                               * decimal format.  We try to interpret the 
string as a decimal
-+                               * short before giving up, in order to support 
setting numeric
-+                               * values with environment variables (eg, port 
number).
-+                               */
-+                              if (ds->value->ptr && *ds->value->ptr) {
-+                                      char *e;
-+                                      long l = strtol(ds->value->ptr, &e, 10);
-+                                      if (e != ds->value->ptr && !*e && l >=0 
&& l <= 65535) {
-+                                              *((unsigned short 
*)(cv[i].destination)) = l;
-+                                              break;
-+
-+                                      }
-+                              }
-+
-                               log_error_write(srv, __FILE__, __LINE__, "ssb", 
"got a string but expected a short:", cv[i].key, ds->value);
- 
-                               return -1;
-@@ -396,6 +413,15 @@
- 
-               break;
-       }
-+      case COMP_HTTP_LANGUAGE: {
-+              data_string *ds;
-+              if (NULL != (ds = (data_string 
*)array_get_element(con->request.headers, "Accept-Language"))) {
-+                      l = ds->value;
-+              } else {
-+                      l = srv->empty_string;
-+              }
-+              break;
-+      }
-       default:
-               return COND_RESULT_FALSE;
-       }
-Index: src/mod_cgi.c
-===================================================================
---- src/mod_cgi.c      (.../tags/lighttpd-1.4.20)      (revision 2392)
-+++ src/mod_cgi.c      (.../branches/lighttpd-1.4.x)   (revision 2392)
-@@ -822,15 +822,27 @@
-                       );
-               cgi_env_add(&env, CONST_STR_LEN("SERVER_PORT"), buf, 
strlen(buf));
- 
-+              switch (srv_sock->addr.plain.sa_family) {
- #ifdef HAVE_IPV6
--              s = inet_ntop(srv_sock->addr.plain.sa_family,
--                            srv_sock->addr.plain.sa_family == AF_INET6 ?
--                            (const void *) &(srv_sock->addr.ipv6.sin6_addr) :
--                            (const void *) &(srv_sock->addr.ipv4.sin_addr),
--                            b2, sizeof(b2)-1);
-+              case AF_INET6:
-+                      s = inet_ntop(srv_sock->addr.plain.sa_family,
-+                                    (const void *) 
&(srv_sock->addr.ipv6.sin6_addr),
-+                                    b2, sizeof(b2)-1);
-+                      break;
-+              case AF_INET:
-+                      s = inet_ntop(srv_sock->addr.plain.sa_family,
-+                                    (const void *) 
&(srv_sock->addr.ipv4.sin_addr),
-+                                    b2, sizeof(b2)-1);
-+                      break;
- #else
--              s = inet_ntoa(srv_sock->addr.ipv4.sin_addr);
-+              case AF_INET:
-+                      s = inet_ntoa(srv_sock->addr.ipv4.sin_addr);
-+                      break;
- #endif
-+              default:
-+                      s = "";
-+                      break;
-+              }
-               cgi_env_add(&env, CONST_STR_LEN("SERVER_ADDR"), s, strlen(s));
- 
-               s = get_http_method_name(con->request.http_method);
-@@ -848,15 +860,27 @@
-               }
- 
- 
-+              switch (con->dst_addr.plain.sa_family) {
- #ifdef HAVE_IPV6
--              s = inet_ntop(con->dst_addr.plain.sa_family,
--                            con->dst_addr.plain.sa_family == AF_INET6 ?
--                            (const void *) &(con->dst_addr.ipv6.sin6_addr) :
--                            (const void *) &(con->dst_addr.ipv4.sin_addr),
--                            b2, sizeof(b2)-1);
-+              case AF_INET6:
-+                      s = inet_ntop(con->dst_addr.plain.sa_family,
-+                                    (const void *) 
&(con->dst_addr.ipv6.sin6_addr),
-+                                    b2, sizeof(b2)-1);
-+                      break;
-+              case AF_INET:
-+                      s = inet_ntop(con->dst_addr.plain.sa_family,
-+                                    (const void *) 
&(con->dst_addr.ipv4.sin_addr),
-+                                    b2, sizeof(b2)-1);
-+                      break;
- #else
--              s = inet_ntoa(con->dst_addr.ipv4.sin_addr);
-+              case AF_INET:
-+                      s = inet_ntoa(con->dst_addr.ipv4.sin_addr);
-+                      break;
- #endif
-+              default:
-+                      s = "";
-+                      break;
-+              }
-               cgi_env_add(&env, CONST_STR_LEN("REMOTE_ADDR"), s, strlen(s));
- 
-               LI_ltostr(buf,
-Index: src/base.h
-===================================================================
---- src/base.h (.../tags/lighttpd-1.4.20)      (revision 2392)
-+++ src/base.h (.../branches/lighttpd-1.4.x)   (revision 2392)
-@@ -260,6 +260,7 @@
-       unsigned short log_response_header;
-       unsigned short log_condition_handling;
-       unsigned short log_ssl_noise;
-+      unsigned short log_timeouts;
- 
- 
-       /* server wide */
-@@ -497,6 +498,7 @@
- #endif
-       } stat_cache_engine;
-       unsigned short enable_cores;
-+      unsigned short reject_expect_100_with_417;
- } server_config;
- 
- typedef struct {
-Index: src/mod_rewrite.c
-===================================================================
---- src/mod_rewrite.c  (.../tags/lighttpd-1.4.20)      (revision 2392)
-+++ src/mod_rewrite.c  (.../branches/lighttpd-1.4.x)   (revision 2392)
-@@ -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 2392)
-+++ src/connections.c  (.../branches/lighttpd-1.4.x)   (revision 2392)
-@@ -330,15 +330,13 @@
-       buffer_prepare_copy(b, 4 * 1024);
-       len = recv(con->fd, b->ptr, b->size - 1, 0);
- #else
--      if (ioctl(con->fd, FIONREAD, &toread)) {
--              log_error_write(srv, __FILE__, __LINE__, "sd",
--                              "unexpected end-of-file:",
--                              con->fd);
--              return -1;
-+      if (ioctl(con->fd, FIONREAD, &toread) || toread == 0) {
-+              b = chunkqueue_get_append_buffer(con->read_queue);
-+              buffer_prepare_copy(b, 4 * 1024);
-+      } else {
-+              b = chunkqueue_get_append_buffer(con->read_queue);
-+              buffer_prepare_copy(b, toread + 1);
-       }
--      b = chunkqueue_get_append_buffer(con->read_queue);
--      buffer_prepare_copy(b, toread + 1);
--
-       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/array.h
-===================================================================
---- src/array.h        (.../tags/lighttpd-1.4.20)      (revision 2392)
-+++ src/array.h        (.../branches/lighttpd-1.4.x)   (revision 2392)
-@@ -87,6 +87,7 @@
-       COMP_HTTP_HOST,
-       COMP_HTTP_REFERER,
-       COMP_HTTP_USER_AGENT,
-+      COMP_HTTP_LANGUAGE,
-       COMP_HTTP_COOKIE,
-       COMP_HTTP_REMOTE_IP,
-       COMP_HTTP_QUERY_STRING,
-Index: src/mod_alias.c
-===================================================================
---- src/mod_alias.c    (.../tags/lighttpd-1.4.20)      (revision 2392)
-+++ src/mod_alias.c    (.../branches/lighttpd-1.4.x)   (revision 2392)
-@@ -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 2392)
-+++ src/configfile.c   (.../branches/lighttpd-1.4.x)   (revision 2392)
-@@ -91,9 +91,11 @@
-               { "server.core-files",           NULL, T_CONFIG_BOOLEAN, 
T_CONFIG_SCOPE_CONNECTION }, /* 46 */
-               { "ssl.cipher-list",             NULL, T_CONFIG_STRING, 
T_CONFIG_SCOPE_SERVER },      /* 47 */
-               { "ssl.use-sslv2",               NULL, T_CONFIG_BOOLEAN, 
T_CONFIG_SCOPE_CONNECTION }, /* 48 */
--              { "etag.use-inode",             NULL, T_CONFIG_BOOLEAN, 
T_CONFIG_SCOPE_SERVER }, /* 49 */
--              { "etag.use-mtime",             NULL, T_CONFIG_BOOLEAN, 
T_CONFIG_SCOPE_SERVER }, /* 50 */
--              { "etag.use-size",             NULL, T_CONFIG_BOOLEAN, 
T_CONFIG_SCOPE_SERVER }, /* 51 */
-+              { "etag.use-inode",              NULL, T_CONFIG_BOOLEAN, 
T_CONFIG_SCOPE_SERVER }, /* 49 */
-+              { "etag.use-mtime",              NULL, T_CONFIG_BOOLEAN, 
T_CONFIG_SCOPE_SERVER }, /* 50 */
-+              { "etag.use-size",               NULL, T_CONFIG_BOOLEAN, 
T_CONFIG_SCOPE_SERVER }, /* 51 */
-+              { "server.reject-expect-100-with-417",  NULL, T_CONFIG_BOOLEAN, 
T_CONFIG_SCOPE_SERVER }, /* 52 */
-+              { "debug.log-timeouts",          NULL, T_CONFIG_BOOLEAN, 
T_CONFIG_SCOPE_CONNECTION }, /* 53 */
-               { "server.host",                 "use server.bind instead", 
T_CONFIG_DEPRECATED, T_CONFIG_SCOPE_UNSET },
-               { "server.docroot",              "use server.document-root 
instead", T_CONFIG_DEPRECATED, T_CONFIG_SCOPE_UNSET },
-               { "server.virtual-root",         "load mod_simple_vhost and use 
simple-vhost.server-root instead", T_CONFIG_DEPRECATED, T_CONFIG_SCOPE_UNSET },
-@@ -135,6 +137,7 @@
- 
-       cv[43].destination = &(srv->srvconf.max_conns);
-       cv[12].destination = &(srv->srvconf.max_request_size);
-+      cv[52].destination = &(srv->srvconf.reject_expect_100_with_417);
-       srv->config_storage = calloc(1, srv->config_context->used * 
sizeof(specific_config *));
- 
-       assert(srv->config_storage);
-@@ -159,7 +162,7 @@
-               s->max_write_idle = 360;
-               s->use_xattr     = 0;
-               s->is_ssl        = 0;
--              s->ssl_use_sslv2 = 1;
-+              s->ssl_use_sslv2 = 0;
-               s->use_ipv6      = 0;
- #ifdef HAVE_LSTAT
-               s->follow_symlink = 1;
-@@ -207,6 +210,7 @@
-               cv[33].destination = &(s->log_response_header);
-               cv[34].destination = &(s->log_request_header);
-               cv[35].destination = &(s->log_ssl_noise);
-+              cv[53].destination = &(s->log_timeouts);
- 
-               cv[36].destination = &(s->allow_http11);
-               cv[39].destination = s->ssl_ca_file;
-@@ -374,6 +378,8 @@
-                               PATCH(log_file_not_found);
-                       } else if (buffer_is_equal_string(du->key, 
CONST_STR_LEN("debug.log-ssl-noise"))) {
-                               PATCH(log_ssl_noise);
-+                      } else if (buffer_is_equal_string(du->key, 
CONST_STR_LEN("debug.log-timeouts"))) {
-+                              PATCH(log_timeouts);
-                       } else if (buffer_is_equal_string(du->key, 
CONST_STR_LEN("server.protocol-http11"))) {
-                               PATCH(allow_http11);
-                       } else if (buffer_is_equal_string(du->key, 
CONST_STR_LEN("server.force-lowercase-filenames"))) {
-@@ -940,7 +946,6 @@
- }
- 
- int config_parse_cmd(server *srv, config_t *context, const char *cmd) {
--      proc_handler_t proc;
-       tokenizer_t t;
-       int ret;
-       buffer *source;
-@@ -960,7 +965,7 @@
-               chdir(context->basedir->ptr);
-       }
- 
--      if (0 != proc_open_buffer(&proc, cmd, NULL, out, NULL)) {
-+      if (0 != proc_open_buffer(cmd, NULL, out, NULL)) {
-               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 2392)
-+++ src/mod_trigger_b4_dl.c    (.../branches/lighttpd-1.4.x)   (revision 2392)
-@@ -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 2392)
-+++ src/mod_mysql_vhost.c      (.../branches/lighttpd-1.4.x)   (revision 2392)
-@@ -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/request.c
-===================================================================
---- src/request.c      (.../tags/lighttpd-1.4.20)      (revision 2392)
-+++ src/request.c      (.../branches/lighttpd-1.4.x)   (revision 2392)
-@@ -894,11 +894,12 @@
-                                                                *
-                                                                */
- 
--                                                              
con->http_status = 417;
--                                                              con->keep_alive 
= 0;
--
--                                                              
array_insert_unique(con->request.headers, (data_unset *)ds);
--                                                              return 0;
-+                                                              if 
(srv->srvconf.reject_expect_100_with_417 && 0 == 
buffer_caseless_compare(CONST_BUF_LEN(ds->value), 
CONST_STR_LEN("100-continue"))) {
-+                                                                      
con->http_status = 417;
-+                                                                      
con->keep_alive = 0;
-+                                                                      
array_insert_unique(con->request.headers, (data_unset *)ds);
-+                                                                      return 
0;
-+                                                              }
-                                                       } else if (cmp > 0 && 0 
== (cmp = buffer_caseless_compare(CONST_BUF_LEN(ds->key), 
CONST_STR_LEN("Host")))) {
-                                                               if 
(!con->request.http_host) {
-                                                                       
con->request.http_host = ds->value;
-@@ -1020,7 +1021,7 @@
-                               /* strip leading WS */
-                               if (value == cur) value = cur+1;
-                       default:
--                              if (*cur >= 0 && *cur < 32) {
-+                              if (*cur >= 0 && *cur < 32 && *cur != '\t') {
-                                       if 
(srv->srvconf.log_request_header_on_error) {
-                                               log_error_write(srv, __FILE__, 
__LINE__, "sds",
-                                                               "invalid char 
in header", (int)*cur, "-> 400");
-Index: src/inet_ntop_cache.c
-===================================================================
---- src/inet_ntop_cache.c      (.../tags/lighttpd-1.4.20)      (revision 2392)
-+++ src/inet_ntop_cache.c      (.../branches/lighttpd-1.4.x)   (revision 2392)
-@@ -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 2392)
-+++ src/mod_rrdtool.c  (.../branches/lighttpd-1.4.x)   (revision 2392)
-@@ -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 2392)
-+++ src/response.c     (.../branches/lighttpd-1.4.x)   (revision 2392)
-@@ -44,16 +44,15 @@
-       buffer_append_string(b, get_http_status_name(con->http_status));
- 
-       if (con->request.http_version != HTTP_VERSION_1_1 || con->keep_alive == 
0) {
--              buffer_append_string_len(b, CONST_STR_LEN("\r\nConnection: "));
-               if (con->keep_alive) {
--                      buffer_append_string_len(b, 
CONST_STR_LEN("keep-alive"));
-+                      response_header_overwrite(srv, con, 
CONST_STR_LEN("Connection"), CONST_STR_LEN("keep-alive"));
-               } else {
--                      buffer_append_string_len(b, CONST_STR_LEN("close"));
-+                      response_header_overwrite(srv, con, 
CONST_STR_LEN("Connection"), CONST_STR_LEN("close"));
-               }
-       }
- 
-       if (con->response.transfer_encoding & HTTP_TRANSFER_ENCODING_CHUNKED) {
--              buffer_append_string_len(b, 
CONST_STR_LEN("\r\nTransfer-Encoding: chunked"));
-+              response_header_overwrite(srv, con, 
CONST_STR_LEN("Transfer-Encoding"), CONST_STR_LEN("chunked"));
-       }
- 
- 
-@@ -199,6 +198,7 @@
-               config_patch_connection(srv, con, COMP_HTTP_REMOTE_IP); /* 
Client-IP */
-               config_patch_connection(srv, con, COMP_HTTP_REFERER);   /* 
Referer:     */
-               config_patch_connection(srv, con, COMP_HTTP_USER_AGENT);/* 
User-Agent:  */
-+              config_patch_connection(srv, con, COMP_HTTP_LANGUAGE);  /* 
Accept-Language:  */
-               config_patch_connection(srv, con, COMP_HTTP_COOKIE);    /* 
Cookie:  */
-               config_patch_connection(srv, con, COMP_HTTP_REQUEST_METHOD); /* 
REQUEST_METHOD */
- 
-@@ -233,6 +233,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 +261,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 +277,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/buffer.c
-===================================================================
---- src/buffer.c       (.../tags/lighttpd-1.4.20)      (revision 2392)
-+++ src/buffer.c       (.../branches/lighttpd-1.4.x)   (revision 2392)
-@@ -159,7 +159,7 @@
-       if (!src) return -1;
- 
-       if (src->used == 0) {
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/lighttpd-branch.sh?r1=1.6&r2=1.7&f=u
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/lighttpd-branch.diff?r1=1.45&r2=1.46&f=u

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

Reply via email to