1 Index: cmake/LighttpdMacros.cmake
2 ===================================================================
3 --- cmake/LighttpdMacros.cmake (.../tags/lighttpd-1.4.20) (revision 0)
4 +++ cmake/LighttpdMacros.cmake (.../branches/lighttpd-1.4.x) (revision 2371)
6 +## our modules are without the "lib" prefix
8 +MACRO(ADD_AND_INSTALL_LIBRARY LIBNAME SRCFILES)
10 + ADD_LIBRARY(${LIBNAME} STATIC ${SRCFILES})
11 + TARGET_LINK_LIBRARIES(lighttpd ${LIBNAME})
13 + ADD_LIBRARY(${LIBNAME} SHARED ${SRCFILES})
14 + SET(L_INSTALL_TARGETS ${L_INSTALL_TARGETS} ${LIBNAME})
15 + ## Windows likes to link it this way back to app!
17 + SET_TARGET_PROPERTIES(${LIBNAME} PROPERTIES LINK_FLAGS lighttpd.lib)
21 + SET_TARGET_PROPERTIES(${LIBNAME} PROPERTIES LINK_FLAGS "-flat_namespace -undefined suppress")
24 +ENDMACRO(ADD_AND_INSTALL_LIBRARY)
26 +MACRO(LEMON_PARSER SRCFILE)
27 + GET_FILENAME_COMPONENT(SRCBASE ${SRCFILE} NAME_WE)
28 + ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${SRCBASE}.c ${CMAKE_CURRENT_BINARY_DIR}/${SRCBASE}.h
29 + COMMAND ${CMAKE_BINARY_DIR}/build/lemon
30 + ARGS -q ${CMAKE_CURRENT_SOURCE_DIR}/${SRCFILE} ${CMAKE_SOURCE_DIR}/src/lempar.c
31 + DEPENDS ${CMAKE_BINARY_DIR}/build/lemon ${CMAKE_CURRENT_SOURCE_DIR}/${SRCFILE} ${CMAKE_SOURCE_DIR}/src/lempar.c
32 + COMMENT "Generating ${SRCBASE}.c from ${SRCFILE}"
34 +ENDMACRO(LEMON_PARSER)
36 +MACRO(ADD_TARGET_PROPERTIES _target _name)
38 + FOREACH(_prop ${ARGN})
39 + SET(_properties "${_properties} ${_prop}")
41 + GET_TARGET_PROPERTY(_old_properties ${_target} ${_name})
42 + MESSAGE("adding property to ${_target} ${_name}:" ${_properties})
43 + IF(NOT _old_properties)
44 + # in case it's NOTFOUND
45 + SET(_old_properties)
46 + ENDIF(NOT _old_properties)
47 + SET_TARGET_PROPERTIES(${_target} PROPERTIES ${_name} "${_old_properties} ${_properties}")
48 +ENDMACRO(ADD_TARGET_PROPERTIES)
50 ===================================================================
51 Index: src/configfile-glue.c
52 ===================================================================
53 --- src/configfile-glue.c (.../tags/lighttpd-1.4.20) (revision 2371)
54 +++ src/configfile-glue.c (.../branches/lighttpd-1.4.x) (revision 2371)
63 data_string *ds = (data_string *)du;
65 + /* If the value came from an environment variable, then it is a
66 + * data_string, although it may contain a number in ASCII
67 + * decimal format. We try to interpret the string as a decimal
68 + * short before giving up, in order to support setting numeric
69 + * values with environment variables (eg, port number).
71 + if (ds->value->ptr && *ds->value->ptr) {
73 + long l = strtol(ds->value->ptr, &e, 10);
74 + if (e != ds->value->ptr && !*e && l >=0 && l <= 65535) {
75 + *((unsigned short *)(cv[i].destination)) = l;
81 log_error_write(srv, __FILE__, __LINE__, "ssb", "got a string but expected a short:", cv[i].key, ds->value);
85 ===================================================================
86 --- src/mod_cgi.c (.../tags/lighttpd-1.4.20) (revision 2371)
87 +++ src/mod_cgi.c (.../branches/lighttpd-1.4.x) (revision 2371)
90 cgi_env_add(&env, CONST_STR_LEN("SERVER_PORT"), buf, strlen(buf));
92 + switch (srv_sock->addr.plain.sa_family) {
94 - s = inet_ntop(srv_sock->addr.plain.sa_family,
95 - srv_sock->addr.plain.sa_family == AF_INET6 ?
96 - (const void *) &(srv_sock->addr.ipv6.sin6_addr) :
97 - (const void *) &(srv_sock->addr.ipv4.sin_addr),
100 + s = inet_ntop(srv_sock->addr.plain.sa_family,
101 + (const void *) &(srv_sock->addr.ipv6.sin6_addr),
105 + s = inet_ntop(srv_sock->addr.plain.sa_family,
106 + (const void *) &(srv_sock->addr.ipv4.sin_addr),
110 - s = inet_ntoa(srv_sock->addr.ipv4.sin_addr);
112 + s = inet_ntoa(srv_sock->addr.ipv4.sin_addr);
119 cgi_env_add(&env, CONST_STR_LEN("SERVER_ADDR"), s, strlen(s));
121 s = get_http_method_name(con->request.http_method);
122 @@ -848,15 +860,27 @@
126 + switch (con->dst_addr.plain.sa_family) {
128 - s = inet_ntop(con->dst_addr.plain.sa_family,
129 - con->dst_addr.plain.sa_family == AF_INET6 ?
130 - (const void *) &(con->dst_addr.ipv6.sin6_addr) :
131 - (const void *) &(con->dst_addr.ipv4.sin_addr),
134 + s = inet_ntop(con->dst_addr.plain.sa_family,
135 + (const void *) &(con->dst_addr.ipv6.sin6_addr),
139 + s = inet_ntop(con->dst_addr.plain.sa_family,
140 + (const void *) &(con->dst_addr.ipv4.sin_addr),
144 - s = inet_ntoa(con->dst_addr.ipv4.sin_addr);
146 + s = inet_ntoa(con->dst_addr.ipv4.sin_addr);
153 cgi_env_add(&env, CONST_STR_LEN("REMOTE_ADDR"), s, strlen(s));
156 Index: src/mod_rewrite.c
157 ===================================================================
158 --- src/mod_rewrite.c (.../tags/lighttpd-1.4.20) (revision 2371)
159 +++ src/mod_rewrite.c (.../branches/lighttpd-1.4.x) (revision 2371)
162 if (!p->conf.rewrite) return HANDLER_GO_ON;
164 - buffer_copy_string_buffer(p->match_buf, con->uri.path);
165 - if (con->uri.query->used > 0) {
166 - buffer_append_string_len(p->match_buf, CONST_STR_LEN("?"));
167 - buffer_append_string_buffer(p->match_buf, con->uri.query);
169 + buffer_copy_string_buffer(p->match_buf, con->request.uri);
171 for (i = 0; i < p->conf.rewrite->used; i++) {
173 Index: src/connections.c
174 ===================================================================
175 --- src/connections.c (.../tags/lighttpd-1.4.20) (revision 2371)
176 +++ src/connections.c (.../branches/lighttpd-1.4.x) (revision 2371)
177 @@ -330,15 +330,13 @@
178 buffer_prepare_copy(b, 4 * 1024);
179 len = recv(con->fd, b->ptr, b->size - 1, 0);
181 - if (ioctl(con->fd, FIONREAD, &toread)) {
182 - log_error_write(srv, __FILE__, __LINE__, "sd",
183 - "unexpected end-of-file:",
186 + if (ioctl(con->fd, FIONREAD, &toread) || toread == 0) {
187 + b = chunkqueue_get_append_buffer(con->read_queue);
188 + buffer_prepare_copy(b, 4 * 1024);
190 + b = chunkqueue_get_append_buffer(con->read_queue);
191 + buffer_prepare_copy(b, toread + 1);
193 - b = chunkqueue_get_append_buffer(con->read_queue);
194 - buffer_prepare_copy(b, toread + 1);
196 len = read(con->fd, b->ptr, b->size - 1);
199 @@ -1066,6 +1064,9 @@
200 if (dst_c->file.fd == -1) {
201 /* this should not happen as we cache the fd, but you never know */
202 dst_c->file.fd = open(dst_c->file.name->ptr, O_WRONLY | O_APPEND);
204 + fcntl(dst_c->file.fd, F_SETFD, FD_CLOEXEC);
208 /* the chunk is too large now, close it */
209 Index: src/mod_alias.c
210 ===================================================================
211 --- src/mod_alias.c (.../tags/lighttpd-1.4.20) (revision 2371)
212 +++ src/mod_alias.c (.../branches/lighttpd-1.4.x) (revision 2371)
215 /* ok, they have same prefix. check position */
216 if (a->sorted[j] < a->sorted[k]) {
217 - fprintf(stderr, "url.alias: `%s' will never match as `%s' matched first\n",
220 + log_error_write(srv, __FILE__, __LINE__, "SBSBS",
221 + "url.alias: `", key, "' will never match as `", prefix, "' matched first");
222 return HANDLER_ERROR;
225 Index: src/configfile.c
226 ===================================================================
227 --- src/configfile.c (.../tags/lighttpd-1.4.20) (revision 2371)
228 +++ src/configfile.c (.../branches/lighttpd-1.4.x) (revision 2371)
232 int config_parse_cmd(server *srv, config_t *context, const char *cmd) {
233 - proc_handler_t proc;
238 chdir(context->basedir->ptr);
241 - if (0 != proc_open_buffer(&proc, cmd, NULL, out, NULL)) {
242 + if (0 != proc_open_buffer(cmd, NULL, out, NULL)) {
243 log_error_write(srv, __FILE__, __LINE__, "sbss",
244 "opening", source, "failed:", strerror(errno));
246 Index: src/mod_trigger_b4_dl.c
247 ===================================================================
248 --- src/mod_trigger_b4_dl.c (.../tags/lighttpd-1.4.20) (revision 2371)
249 +++ src/mod_trigger_b4_dl.c (.../branches/lighttpd-1.4.x) (revision 2371)
259 return HANDLER_ERROR;
262 + fcntl(gdbm_fdesc(s->db), F_SETFD, FD_CLOEXEC);
266 #if defined(HAVE_PCRE_H)
267 Index: src/mod_mysql_vhost.c
268 ===================================================================
269 --- src/mod_mysql_vhost.c (.../tags/lighttpd-1.4.20) (revision 2371)
270 +++ src/mod_mysql_vhost.c (.../branches/lighttpd-1.4.x) (revision 2371)
272 if (!(buffer_is_empty(s->myuser) ||
273 buffer_is_empty(s->mydb))) {
274 my_bool reconnect = 1;
277 if (NULL == (s->mysql = mysql_init(NULL))) {
278 log_error_write(srv, __FILE__, __LINE__, "s", "mysql_init() failed, exiting...");
279 @@ -267,19 +266,27 @@
280 return HANDLER_ERROR;
285 /* set close_on_exec for mysql the hard way */
286 /* Note: this only works as it is done during startup, */
287 /* otherwise we cannot be sure that mysql is fd i-1 */
288 - if (-1 == (fd = open("/dev/null", 0))) {
290 + if (-1 != (fd = open("/dev/null", 0))) {
293 fcntl(fd-1, F_SETFD, FD_CLOEXEC);
299 + fcntl(s->mysql->net.fd, F_SETFD, FD_CLOEXEC);
307 - return HANDLER_GO_ON;
308 + return HANDLER_GO_ON;
312 Index: src/inet_ntop_cache.c
313 ===================================================================
314 --- src/inet_ntop_cache.c (.../tags/lighttpd-1.4.20) (revision 2371)
315 +++ src/inet_ntop_cache.c (.../branches/lighttpd-1.4.x) (revision 2371)
319 for (i = 0; i < INET_NTOP_CACHE_MAX; i++) {
320 - if (srv->inet_ntop_cache[i].ts != 0) {
321 + if (srv->inet_ntop_cache[i].ts != 0 && srv->inet_ntop_cache[i].family == addr->plain.sa_family) {
322 if (srv->inet_ntop_cache[i].family == AF_INET6 &&
323 0 == memcmp(srv->inet_ntop_cache[i].addr.ipv6.s6_addr, addr->ipv6.sin6_addr.s6_addr, 16)) {
324 /* IPv6 found in cache */
325 Index: src/mod_rrdtool.c
326 ===================================================================
327 --- src/mod_rrdtool.c (.../tags/lighttpd-1.4.20) (revision 2371)
328 +++ src/mod_rrdtool.c (.../branches/lighttpd-1.4.x) (revision 2371)
330 p->read_fd = from_rrdtool_fds[0];
331 p->rrdtool_pid = pid;
334 + fcntl(p->write_fd, F_SETFD, FD_CLOEXEC);
335 + fcntl(p->read_fd, F_SETFD, FD_CLOEXEC);
341 Index: src/response.c
342 ===================================================================
343 --- src/response.c (.../tags/lighttpd-1.4.20) (revision 2371)
344 +++ src/response.c (.../branches/lighttpd-1.4.x) (revision 2371)
346 buffer_append_string(b, get_http_status_name(con->http_status));
348 if (con->request.http_version != HTTP_VERSION_1_1 || con->keep_alive == 0) {
349 - buffer_append_string_len(b, CONST_STR_LEN("\r\nConnection: "));
350 if (con->keep_alive) {
351 - buffer_append_string_len(b, CONST_STR_LEN("keep-alive"));
352 + response_header_overwrite(srv, con, CONST_STR_LEN("Connection"), CONST_STR_LEN("keep-alive"));
354 - buffer_append_string_len(b, CONST_STR_LEN("close"));
355 + response_header_overwrite(srv, con, CONST_STR_LEN("Connection"), CONST_STR_LEN("close"));
359 if (con->response.transfer_encoding & HTTP_TRANSFER_ENCODING_CHUNKED) {
360 - buffer_append_string_len(b, CONST_STR_LEN("\r\nTransfer-Encoding: chunked"));
361 + response_header_overwrite(srv, con, CONST_STR_LEN("Transfer-Encoding"), CONST_STR_LEN("chunked"));
373 + * - based on the raw URL
377 + switch(r = plugins_call_handle_uri_raw(srv, con)) {
378 + case HANDLER_GO_ON:
380 + case HANDLER_FINISHED:
381 + case HANDLER_COMEBACK:
382 + case HANDLER_WAIT_FOR_EVENT:
383 + case HANDLER_ERROR:
386 + log_error_write(srv, __FILE__, __LINE__, "sd", "handle_uri_raw: unknown return value", r);
392 * - decode url-encodings (e.g. %20 -> ' ')
398 if (con->request.http_method == HTTP_METHOD_OPTIONS &&
399 con->uri.path_raw->ptr[0] == '*' && con->uri.path_raw->ptr[1] == '\0') {
401 @@ -255,32 +276,10 @@
402 log_error_write(srv, __FILE__, __LINE__, "sb", "URI-path : ", con->uri.path);
410 - * - based on the raw URL
414 - switch(r = plugins_call_handle_uri_raw(srv, con)) {
415 - case HANDLER_GO_ON:
417 - case HANDLER_FINISHED:
418 - case HANDLER_COMEBACK:
419 - case HANDLER_WAIT_FOR_EVENT:
420 - case HANDLER_ERROR:
423 - log_error_write(srv, __FILE__, __LINE__, "sd", "handle_uri_raw: unknown return value", r);
431 * - based on the clean URL
434 Index: src/mod_simple_vhost.c
435 ===================================================================
436 --- src/mod_simple_vhost.c (.../tags/lighttpd-1.4.20) (revision 2371)
437 +++ src/mod_simple_vhost.c (.../branches/lighttpd-1.4.x) (revision 2371)
439 return HANDLER_GO_ON;
441 buffer_copy_string_buffer(con->server_name, p->conf.default_host);
442 + /* do not cache default host */
443 + return HANDLER_GO_ON;
446 buffer_copy_string_buffer(con->server_name, con->uri.authority);
447 Index: src/mod_proxy.c
448 ===================================================================
449 --- src/mod_proxy.c (.../tags/lighttpd-1.4.20) (revision 2371)
450 +++ src/mod_proxy.c (.../branches/lighttpd-1.4.x) (revision 2371)
452 buffer_prepare_append(hctx->response, b + 1);
453 hctx->response->used = 1;
455 - buffer_prepare_append(hctx->response, hctx->response->used + b);
456 + buffer_prepare_append(hctx->response, b);
459 if (-1 == (r = read(hctx->fd, hctx->response->ptr + hctx->response->used - 1, b))) {
460 @@ -1198,7 +1198,8 @@
461 host = (data_proxy *)extension->value->data[0];
463 /* Use last_used_ndx from first host in list */
464 - k = ndx = host->last_used_ndx;
465 + k = host->last_used_ndx;
466 + ndx = k + 1; /* use next host after the last one */
467 if (ndx < 0) ndx = 0;
469 /* Search first active host after last_used_ndx */
470 Index: src/config.h.cmake
471 ===================================================================
472 --- src/config.h.cmake (.../tags/lighttpd-1.4.20) (revision 0)
473 +++ src/config.h.cmake (.../branches/lighttpd-1.4.x) (revision 2371)
476 + CMake autogenerated config.h file. Do not edit!
480 +#cmakedefine HAVE_SYS_DEVPOLL_H
481 +#cmakedefine HAVE_SYS_EPOLL_H
482 +#cmakedefine HAVE_SYS_EVENT_H
483 +#cmakedefine HAVE_SYS_MMAN_H
484 +#cmakedefine HAVE_SYS_POLL_H
485 +#cmakedefine HAVE_SYS_PORT_H
486 +#cmakedefine HAVE_SYS_PRCTL_H
487 +#cmakedefine HAVE_SYS_RESOURCE_H
488 +#cmakedefine HAVE_SYS_SENDFILE_H
489 +#cmakedefine HAVE_SYS_SELECT_H
490 +#cmakedefine HAVE_SYS_SYSLIMITS_H
491 +#cmakedefine HAVE_SYS_TYPES_H
492 +#cmakedefine HAVE_SYS_UIO_H
493 +#cmakedefine HAVE_SYS_UN_H
494 +#cmakedefine HAVE_SYS_WAIT_H
495 +#cmakedefine HAVE_SYS_TIME_H
496 +#cmakedefine HAVE_UNISTD_H
497 +#cmakedefine HAVE_PTHREAD_H
498 +#cmakedefine HAVE_INET_ATON
499 +#cmakedefine HAVE_IPV6
502 +#cmakedefine HAVE_ATTR_ATTRIBUTES_H
503 +#cmakedefine HAVE_XATTR
506 +#cmakedefine HAVE_MYSQL_H
507 +#cmakedefine HAVE_MYSQL
510 +#cmakedefine HAVE_OPENSSL_SSL_H
511 +#cmakedefine HAVE_LIBCRYPTO
512 +#cmakedefine OPENSSL_NO_KRB5
513 +#cmakedefine HAVE_LIBSSL
516 +#cmakedefine HAVE_BZLIB_H
517 +#cmakedefine HAVE_LIBBZ2
520 +#cmakedefine HAVE_FAM_H
521 +#cmakedefine HAVE_FAMNOEXISTS
524 +#cmakedefine HAVE_GETOPT_H
526 +#cmakedefine HAVE_INTTYPES_H
529 +#cmakedefine HAVE_LDAP_H
530 +#cmakedefine HAVE_LIBLDAP
531 +#cmakedefine HAVE_LBER_H
532 +#cmakedefine HAVE_LIBLBER
533 +#cmakedefine LDAP_DEPRECATED 1
536 +#cmakedefine HAVE_LIBXML_H
537 +#cmakedefine HAVE_LIBXML
540 +#cmakedefine HAVE_PCRE_H
541 +#cmakedefine HAVE_LIBPCRE
543 +#cmakedefine HAVE_POLL_H
544 +#cmakedefine HAVE_PWD_H
547 +#cmakedefine HAVE_SQLITE3_H
548 +#cmakedefine HAVE_LIBPCRE
550 +#cmakedefine HAVE_STDDEF_H
551 +#cmakedefine HAVE_STDINT_H
552 +#cmakedefine HAVE_SYSLOG_H
555 +#cmakedefine HAVE_UUID_UUID_H
556 +#cmakedefine HAVE_LIBUUID
559 +#cmakedefine HAVE_ZLIB_H
560 +#cmakedefine HAVE_LIBZ
563 +#cmakedefine HAVE_LUA_H
564 +#cmakedefine HAVE_LIBLUA
567 +#cmakedefine HAVE_GDBM_H
568 +#cmakedefine HAVE_GDBM
571 +#cmakedefine HAVE_MEMCACHE_H
574 +#cmakedefine HAVE_INOTIFY_INIT
575 +#cmakedefine HAVE_SYS_INOTIFY_H
578 +#cmakedefine HAVE_SOCKLEN_T
579 +#cmakedefine SIZEOF_LONG ${SIZEOF_LONG}
580 +#cmakedefine SIZEOF_OFF_T ${SIZEOF_OFF_T}
583 +#cmakedefine HAVE_CHROOT
584 +#cmakedefine HAVE_CRYPT
585 +#cmakedefine HAVE_EPOLL_CTL
586 +#cmakedefine HAVE_FORK
587 +#cmakedefine HAVE_GETRLIMIT
588 +#cmakedefine HAVE_GETUID
589 +#cmakedefine HAVE_GMTIME_R
590 +#cmakedefine HAVE_INET_NTOP
591 +#cmakedefine HAVE_KQUEUE
592 +#cmakedefine HAVE_LOCALTIME_R
593 +#cmakedefine HAVE_LSTAT
594 +#cmakedefine HAVE_MADVISE
595 +#cmakedefine HAVE_MEMCPY
596 +#cmakedefine HAVE_MEMSET
597 +#cmakedefine HAVE_MMAP
598 +#cmakedefine HAVE_PATHCONF
599 +#cmakedefine HAVE_POLL
600 +#cmakedefine HAVE_PORT_CREATE
601 +#cmakedefine HAVE_PRCTL
602 +#cmakedefine HAVE_PREAD
603 +#cmakedefine HAVE_POSIX_FADVISE
604 +#cmakedefine HAVE_SELECT
605 +#cmakedefine HAVE_SENDFILE
606 +#cmakedefine HAVE_SEND_FILE
607 +#cmakedefine HAVE_SENDFILE64
608 +#cmakedefine HAVE_SENDFILEV
609 +#cmakedefine HAVE_SIGACTION
610 +#cmakedefine HAVE_SIGNAL
611 +#cmakedefine HAVE_SIGTIMEDWAIT
612 +#cmakedefine HAVE_STRPTIME
613 +#cmakedefine HAVE_SYSLOG
614 +#cmakedefine HAVE_WRITEV
617 +#cmakedefine HAVE_CRYPT_H
618 +#cmakedefine HAVE_LIBCRYPT
621 +#cmakedefine HAVE_FASTCGI_H
622 +#cmakedefine HAVE_FASTCGI_FASTCGI_H
624 +#cmakedefine LIGHTTPD_STATIC
625 Index: src/http_auth.c
626 ===================================================================
627 --- src/http_auth.c (.../tags/lighttpd-1.4.20) (revision 2371)
628 +++ src/http_auth.c (.../branches/lighttpd-1.4.x) (revision 2371)
631 static const char base64_pad = '=';
633 +/* "A-Z a-z 0-9 + /" maps to 0-63 */
634 static const short base64_reverse_table[256] = {
635 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
636 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
637 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63,
638 - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1,
639 - -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
640 - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1,
641 - -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
642 - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1,
643 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
644 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
645 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
646 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
647 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
648 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
649 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
650 +/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
651 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x00 - 0x0F */
652 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x10 - 0x1F */
653 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63, /* 0x20 - 0x2F */
654 + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1, /* 0x30 - 0x3F */
655 + -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, /* 0x40 - 0x4F */
656 + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, /* 0x50 - 0x5F */
657 + -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, /* 0x60 - 0x6F */
658 + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1, /* 0x70 - 0x7F */
659 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x80 - 0x8F */
660 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x90 - 0x9F */
661 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xA0 - 0xAF */
662 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xB0 - 0xBF */
663 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xC0 - 0xCF */
664 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xD0 - 0xDF */
665 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xE0 - 0xEF */
666 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xF0 - 0xFF */
672 } else if (p->conf.auth_backend == AUTH_BACKEND_LDAP) {
676 LDAPMessage *lm, *first;
679 @@ -742,56 +745,45 @@
680 buffer_append_string_buffer(p->ldap_filter, username);
681 buffer_append_string_buffer(p->ldap_filter, p->conf.ldap_filter_post);
685 - if (p->conf.ldap == NULL ||
686 - LDAP_SUCCESS != (ret = ldap_search_s(p->conf.ldap, p->conf.auth_ldap_basedn->ptr, LDAP_SCOPE_SUBTREE, p->ldap_filter->ptr, attrs, 0, &lm))) {
687 - /* try again if ldap was only temporary down */
688 - if (p->conf.ldap == NULL || ret != LDAP_SERVER_DOWN || LDAP_SUCCESS != (ret = ldap_search_s(p->conf.ldap, p->conf.auth_ldap_basedn->ptr, LDAP_SCOPE_SUBTREE, p->ldap_filter->ptr, attrs, 0, &lm))) {
689 - if (auth_ldap_init(srv, &p->conf) != HANDLER_GO_ON)
690 + if (p->anon_conf->ldap == NULL ||
691 + LDAP_SUCCESS != (ret = ldap_search_s(p->anon_conf->ldap, p->conf.auth_ldap_basedn->ptr, LDAP_SCOPE_SUBTREE, p->ldap_filter->ptr, attrs, 0, &lm))) {
693 + /* try again; the ldap library sometimes fails for the first call but reconnects */
694 + if (p->anon_conf->ldap == NULL || ret != LDAP_SERVER_DOWN ||
695 + LDAP_SUCCESS != (ret = ldap_search_s(p->anon_conf->ldap, p->conf.auth_ldap_basedn->ptr, LDAP_SCOPE_SUBTREE, p->ldap_filter->ptr, attrs, 0, &lm))) {
697 + if (auth_ldap_init(srv, p->anon_conf) != HANDLER_GO_ON)
700 - ldap = p->conf.ldap; /* save temporary ldap connection (TODO: redo ldap) */
701 - if (LDAP_SUCCESS != (ret = ldap_search_s(p->conf.ldap, p->conf.auth_ldap_basedn->ptr, LDAP_SCOPE_SUBTREE, p->ldap_filter->ptr, attrs, 0, &lm))) {
702 + if (p->anon_conf->ldap == NULL ||
703 + LDAP_SUCCESS != (ret = ldap_search_s(p->anon_conf->ldap, p->conf.auth_ldap_basedn->ptr, LDAP_SCOPE_SUBTREE, p->ldap_filter->ptr, attrs, 0, &lm))) {
704 log_error_write(srv, __FILE__, __LINE__, "sssb",
705 "ldap:", ldap_err2string(ret), "filter:", p->ldap_filter);
706 - /* destroy temporary ldap connection (TODO: redo ldap) */
707 - ldap_unbind_s(ldap);
713 - if (NULL == (first = ldap_first_entry(p->conf.ldap, lm))) {
714 - /* No matching entry is not an error */
715 - /* log_error_write(srv, __FILE__, __LINE__, "s", "ldap ..."); */
716 + if (NULL == (first = ldap_first_entry(p->anon_conf->ldap, lm))) {
717 + log_error_write(srv, __FILE__, __LINE__, "s", "ldap ...");
721 - /* destroy temporary ldap connection (TODO: redo ldap) */
722 - if (NULL != ldap) {
723 - ldap_unbind_s(ldap);
728 - if (NULL == (dn = ldap_get_dn(p->conf.ldap, first))) {
729 - log_error_write(srv, __FILE__, __LINE__, "s", "ldap: ldap_get_dn failed");
730 + if (NULL == (dn = ldap_get_dn(p->anon_conf->ldap, first))) {
731 + log_error_write(srv, __FILE__, __LINE__, "s", "ldap ...");
735 - /* destroy temporary ldap connection (TODO: redo ldap) */
736 - if (NULL != ldap) {
737 - ldap_unbind_s(ldap);
744 - /* destroy temporary ldap connection (TODO: redo ldap) */
745 - if (NULL != ldap) {
746 - ldap_unbind_s(ldap);
750 if (NULL == (ldap = ldap_init(p->conf.auth_ldap_hostname->ptr, LDAP_PORT))) {
751 Index: src/mod_redirect.c
752 ===================================================================
753 --- src/mod_redirect.c (.../tags/lighttpd-1.4.20) (revision 2371)
754 +++ src/mod_redirect.c (.../branches/lighttpd-1.4.x) (revision 2371)
757 mod_redirect_patch_connection(srv, con, p);
759 - buffer_copy_string_buffer(p->match_buf, con->uri.path);
760 - if (con->uri.query->used > 0) {
761 - buffer_append_string_len(p->match_buf, CONST_STR_LEN("?"));
762 - buffer_append_string_buffer(p->match_buf, con->uri.query);
764 + buffer_copy_string_buffer(p->match_buf, con->request.uri);
766 for (i = 0; i < p->conf.redirect->used; i++) {
768 Index: src/http_auth.h
769 ===================================================================
770 --- src/http_auth.h (.../tags/lighttpd-1.4.20) (revision 2371)
771 +++ src/http_auth.h (.../branches/lighttpd-1.4.x) (revision 2371)
774 mod_auth_plugin_config **config_storage;
776 - mod_auth_plugin_config conf; /* this is only used as long as no handler_ctx is setup */
777 + mod_auth_plugin_config conf, *anon_conf; /* this is only used as long as no handler_ctx is setup */
778 } mod_auth_plugin_data;
780 int http_auth_basic_check(server *srv, connection *con, mod_auth_plugin_data *p, array *req, buffer *url, const char *realm_str);
781 Index: src/mod_webdav.c
782 ===================================================================
783 --- src/mod_webdav.c (.../tags/lighttpd-1.4.20) (revision 2371)
784 +++ src/mod_webdav.c (.../branches/lighttpd-1.4.x) (revision 2371)
785 @@ -1026,6 +1026,8 @@
786 if (MAP_FAILED == (c->file.mmap.start = mmap(0, c->file.length, PROT_READ, MAP_SHARED, c->file.fd, 0))) {
787 log_error_write(srv, __FILE__, __LINE__, "ssbd", "mmap failed: ",
788 strerror(errno), c->file.name, c->file.fd);
794 @@ -1723,6 +1725,8 @@
795 if (MAP_FAILED == (c->file.mmap.start = mmap(0, c->file.length, PROT_READ, MAP_SHARED, c->file.fd, 0))) {
796 log_error_write(srv, __FILE__, __LINE__, "ssbd", "mmap failed: ",
797 strerror(errno), c->file.name, c->file.fd);
801 return HANDLER_ERROR;
803 Index: src/mod_compress.c
804 ===================================================================
805 --- src/mod_compress.c (.../tags/lighttpd-1.4.20) (revision 2371)
806 +++ src/mod_compress.c (.../branches/lighttpd-1.4.x) (revision 2371)
808 buffer *compress_cache_dir;
810 off_t compress_max_filesize; /** max filesize in kb */
811 + int allowed_encodings;
816 { "compress.cache-dir", NULL, T_CONFIG_STRING, T_CONFIG_SCOPE_CONNECTION },
817 { "compress.filetype", NULL, T_CONFIG_ARRAY, T_CONFIG_SCOPE_CONNECTION },
818 { "compress.max-filesize", NULL, T_CONFIG_SHORT, T_CONFIG_SCOPE_CONNECTION },
819 + { "compress.allowed-encodings", NULL, T_CONFIG_ARRAY, T_CONFIG_SCOPE_CONNECTION },
820 { NULL, NULL, T_CONFIG_UNSET, T_CONFIG_SCOPE_UNSET }
823 @@ -161,15 +163,18 @@
825 for (i = 0; i < srv->config_context->used; i++) {
827 + array *encodings_arr = array_init();
829 s = calloc(1, sizeof(plugin_config));
830 s->compress_cache_dir = buffer_init();
831 s->compress = array_init();
832 s->compress_max_filesize = 0;
833 + s->allowed_encodings = 0;
835 cv[0].destination = s->compress_cache_dir;
836 cv[1].destination = s->compress;
837 cv[2].destination = &(s->compress_max_filesize);
838 + cv[3].destination = encodings_arr; /* temp array for allowed encodings list */
840 p->config_storage[i] = s;
843 return HANDLER_ERROR;
846 + if (encodings_arr->used) {
848 + for (j = 0; j < encodings_arr->used; j++) {
849 + data_string *ds = (data_string *)encodings_arr->data[j];
851 + if (NULL != strstr(ds->value->ptr, "gzip"))
852 + s->allowed_encodings |= HTTP_ACCEPT_ENCODING_GZIP;
853 + if (NULL != strstr(ds->value->ptr, "deflate"))
854 + s->allowed_encodings |= HTTP_ACCEPT_ENCODING_DEFLATE;
856 + if (NULL != strstr(ds->value->ptr, "compress"))
857 + s->allowed_encodings |= HTTP_ACCEPT_ENCODING_COMPRESS;
861 + if (NULL != strstr(ds->value->ptr, "bzip2"))
862 + s->allowed_encodings |= HTTP_ACCEPT_ENCODING_BZIP2;
866 + /* default encodings */
867 + s->allowed_encodings = 0
869 + | HTTP_ACCEPT_ENCODING_GZIP | HTTP_ACCEPT_ENCODING_DEFLATE
872 + | HTTP_ACCEPT_ENCODING_BZIP2
877 + array_free(encodings_arr);
879 if (!buffer_is_empty(s->compress_cache_dir)) {
881 mkdir_recursive(s->compress_cache_dir->ptr);
883 PATCH(compress_cache_dir);
885 PATCH(compress_max_filesize);
886 + PATCH(allowed_encodings);
888 /* skip the first, the global context */
889 for (i = 1; i < srv->config_context->used; i++) {
892 } else if (buffer_is_equal_string(du->key, CONST_STR_LEN("compress.max-filesize"))) {
893 PATCH(compress_max_filesize);
894 + } else if (buffer_is_equal_string(du->key, CONST_STR_LEN("compress.allowed-encodings"))) {
895 + PATCH(allowed_encodings);
899 @@ -668,27 +709,21 @@
900 if (NULL != (ds = (data_string *)array_get_element(con->request.headers, "Accept-Encoding"))) {
901 int accept_encoding = 0;
902 char *value = ds->value->ptr;
903 - int srv_encodings = 0;
904 int matched_encodings = 0;
906 /* get client side support encodings */
908 if (NULL != strstr(value, "gzip")) accept_encoding |= HTTP_ACCEPT_ENCODING_GZIP;
909 if (NULL != strstr(value, "deflate")) accept_encoding |= HTTP_ACCEPT_ENCODING_DEFLATE;
910 if (NULL != strstr(value, "compress")) accept_encoding |= HTTP_ACCEPT_ENCODING_COMPRESS;
913 if (NULL != strstr(value, "bzip2")) accept_encoding |= HTTP_ACCEPT_ENCODING_BZIP2;
915 if (NULL != strstr(value, "identity")) accept_encoding |= HTTP_ACCEPT_ENCODING_IDENTITY;
917 - /* get server side supported ones */
919 - srv_encodings |= HTTP_ACCEPT_ENCODING_BZIP2;
922 - srv_encodings |= HTTP_ACCEPT_ENCODING_GZIP;
923 - srv_encodings |= HTTP_ACCEPT_ENCODING_DEFLATE;
926 /* find matching entries */
927 - matched_encodings = accept_encoding & srv_encodings;
928 + matched_encodings = accept_encoding & p->conf.allowed_encodings;
930 if (matched_encodings) {
931 const char *dflt_gzip = "gzip";
932 Index: src/spawn-fcgi.c
933 ===================================================================
934 --- src/spawn-fcgi.c (.../tags/lighttpd-1.4.20) (revision 2371)
935 +++ src/spawn-fcgi.c (.../branches/lighttpd-1.4.x) (revision 2371)
940 - memset(&fcgi_addr, 0, sizeof(fcgi_addr));
941 + memset(&fcgi_addr_un, 0, sizeof(fcgi_addr_un));
943 fcgi_addr_un.sun_family = AF_UNIX;
944 strcpy(fcgi_addr_un.sun_path, unixsocket);
946 socket_type = AF_UNIX;
947 fcgi_addr = (struct sockaddr *) &fcgi_addr_un;
949 + memset(&fcgi_addr_in, 0, sizeof(fcgi_addr_in));
950 fcgi_addr_in.sin_family = AF_INET;
951 - if (addr != NULL) {
952 - fcgi_addr_in.sin_addr.s_addr = inet_addr(addr);
954 - fcgi_addr_in.sin_addr.s_addr = htonl(INADDR_ANY);
956 + if (addr != NULL) {
957 + fcgi_addr_in.sin_addr.s_addr = inet_addr(addr);
959 + fcgi_addr_in.sin_addr.s_addr = htonl(INADDR_ANY);
961 fcgi_addr_in.sin_port = htons(port);
962 servlen = sizeof(fcgi_addr_in);
964 Index: src/mod_auth.c
965 ===================================================================
966 --- src/mod_auth.c (.../tags/lighttpd-1.4.20) (revision 2371)
967 +++ src/mod_auth.c (.../branches/lighttpd-1.4.x) (revision 2371)
969 PATCH(auth_ldap_starttls);
970 PATCH(auth_ldap_allow_empty_pw);
974 PATCH(ldap_filter_pre);
975 PATCH(ldap_filter_post);
978 } else if (buffer_is_equal_string(du->key, CONST_STR_LEN("auth.backend.ldap.hostname"))) {
979 PATCH(auth_ldap_hostname);
984 } else if (buffer_is_equal_string(du->key, CONST_STR_LEN("auth.backend.ldap.base-dn"))) {
985 PATCH(auth_ldap_basedn);
990 - switch(s->auth_backend) {
991 + switch(s->auth_ldap_hostname->used) {
992 case AUTH_BACKEND_LDAP: {
993 handler_t ret = auth_ldap_init(srv, s);
994 if (ret == HANDLER_ERROR)
998 if (s->auth_ldap_hostname->used) {
999 + /* free old context */
1000 + if (NULL != s->ldap) ldap_unbind_s(s->ldap);
1002 if (NULL == (s->ldap = ldap_init(s->auth_ldap_hostname->ptr, LDAP_PORT))) {
1003 log_error_write(srv, __FILE__, __LINE__, "ss", "ldap ...", strerror(errno));
1005 Index: src/http-header-glue.c
1006 ===================================================================
1007 --- src/http-header-glue.c (.../tags/lighttpd-1.4.20) (revision 2371)
1008 +++ src/http-header-glue.c (.../branches/lighttpd-1.4.x) (revision 2371)
1010 strncpy(buf, con->request.http_if_modified_since, used_len);
1011 buf[used_len] = '\0';
1014 if (NULL == strptime(buf, "%a, %d %b %Y %H:%M:%S GMT", &tm)) {
1015 con->http_status = 412;
1018 strncpy(buf, con->request.http_if_modified_since, used_len);
1019 buf[used_len] = '\0';
1022 if (NULL == strptime(buf, "%a, %d %b %Y %H:%M:%S GMT", &tm)) {
1024 * parsing failed, let's get out of here
1025 Index: src/mod_fastcgi.c
1026 ===================================================================
1027 --- src/mod_fastcgi.c (.../tags/lighttpd-1.4.20) (revision 2371)
1028 +++ src/mod_fastcgi.c (.../branches/lighttpd-1.4.x) (revision 2371)
1029 @@ -3252,6 +3252,7 @@
1030 fcgi_connection_close(srv, hctx);
1033 + con->http_status = 0;
1034 con->file_started = 1; /* fcgi_extension won't touch the request afterwards */
1037 @@ -3608,47 +3609,50 @@
1038 "handling it in mod_fastcgi");
1041 - /* the prefix is the SCRIPT_NAME,
1042 - * everything from start to the next slash
1043 - * this is important for check-local = "disable"
1045 - * if prefix = /admin.fcgi
1047 - * /admin.fcgi/foo/bar
1049 - * SCRIPT_NAME = /admin.fcgi
1050 - * PATH_INFO = /foo/bar
1052 - * if prefix = /fcgi-bin/
1054 - * /fcgi-bin/foo/bar
1056 - * SCRIPT_NAME = /fcgi-bin/foo
1057 - * PATH_INFO = /bar
1059 - * if prefix = /, and fix-root-path-name is enable
1061 - * /fcgi-bin/foo/bar
1063 - * SCRIPT_NAME = /fcgi-bin/foo
1064 - * PATH_INFO = /bar
1067 + /* do not split path info for authorizer */
1068 + if (host->mode != FCGI_AUTHORIZER) {
1069 + /* the prefix is the SCRIPT_NAME,
1070 + * everything from start to the next slash
1071 + * this is important for check-local = "disable"
1073 + * if prefix = /admin.fcgi
1075 + * /admin.fcgi/foo/bar
1077 + * SCRIPT_NAME = /admin.fcgi
1078 + * PATH_INFO = /foo/bar
1080 + * if prefix = /fcgi-bin/
1082 + * /fcgi-bin/foo/bar
1084 + * SCRIPT_NAME = /fcgi-bin/foo
1085 + * PATH_INFO = /bar
1087 + * if prefix = /, and fix-root-path-name is enable
1089 + * /fcgi-bin/foo/bar
1091 + * SCRIPT_NAME = /fcgi-bin/foo
1092 + * PATH_INFO = /bar
1096 - /* the rewrite is only done for /prefix/? matches */
1097 - if (extension->key->ptr[0] == '/' &&
1098 - con->uri.path->used > extension->key->used &&
1099 - NULL != (pathinfo = strchr(con->uri.path->ptr + extension->key->used - 1, '/'))) {
1100 - /* rewrite uri.path and pathinfo */
1101 + /* the rewrite is only done for /prefix/? matches */
1102 + if (extension->key->ptr[0] == '/' &&
1103 + con->uri.path->used > extension->key->used &&
1104 + NULL != (pathinfo = strchr(con->uri.path->ptr + extension->key->used - 1, '/'))) {
1105 + /* rewrite uri.path and pathinfo */
1107 - buffer_copy_string(con->request.pathinfo, pathinfo);
1108 + buffer_copy_string(con->request.pathinfo, pathinfo);
1110 - con->uri.path->used -= con->request.pathinfo->used - 1;
1111 - con->uri.path->ptr[con->uri.path->used - 1] = '\0';
1112 - } else if (host->fix_root_path_name && extension->key->ptr[0] == '/' && extension->key->ptr[1] == '\0') {
1113 - buffer_copy_string(con->request.pathinfo, con->uri.path->ptr);
1114 - con->uri.path->used = 1;
1115 - con->uri.path->ptr[con->uri.path->used - 1] = '\0';
1116 + con->uri.path->used -= con->request.pathinfo->used - 1;
1117 + con->uri.path->ptr[con->uri.path->used - 1] = '\0';
1118 + } else if (host->fix_root_path_name && extension->key->ptr[0] == '/' && extension->key->ptr[1] == '\0') {
1119 + buffer_copy_string(con->request.pathinfo, con->uri.path->ptr);
1120 + con->uri.path->used = 1;
1121 + con->uri.path->ptr[con->uri.path->used - 1] = '\0';
1126 Index: src/CMakeLists.txt
1127 ===================================================================
1128 --- src/CMakeLists.txt (.../tags/lighttpd-1.4.20) (revision 0)
1129 +++ src/CMakeLists.txt (.../branches/lighttpd-1.4.x) (revision 2371)
1131 +INCLUDE(CheckCSourceCompiles)
1132 +INCLUDE(CheckIncludeFiles)
1133 +INCLUDE(CheckFunctionExists)
1134 +INCLUDE(CheckVariableExists)
1135 +INCLUDE(CheckTypeSize)
1136 +INCLUDE(CheckLibraryExists)
1137 +INCLUDE(CMakeDetermineCCompiler)
1138 +INCLUDE(FindThreads)
1139 +INCLUDE(FindPkgConfig)
1141 +INCLUDE(LighttpdMacros)
1143 +ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES)
1145 +OPTION(WITH_XATTR "with xattr-support for the stat-cache [default: off]")
1146 +OPTION(WITH_MYSQL "with mysql-support for the mod_sql_vhost [default: off]")
1147 +# OPTION(WITH_POSTGRESQL "with postgress-support for the mod_sql_vhost [default: off]")
1148 +OPTION(WITH_OPENSSL "with openssl-support [default: off]")
1149 +OPTION(WITH_PCRE "with regex support [default: on]" ON)
1150 +OPTION(WITH_WEBDAV_PROPS "with property-support for mod_webdav [default: off]")
1151 +OPTION(WITH_WEBDAV_LOCKS "locks in webdav [default: off]")
1152 +OPTION(WITH_BZIP "with bzip2-support for mod_compress [default: off]")
1153 +OPTION(WITH_ZLIB "with deflate-support for mod_compress [default: on]" ON)
1154 +OPTION(WITH_LDAP "with LDAP-support for the mod_auth [default: off]")
1155 +OPTION(WITH_LUA "with lua 5.1 for mod_magnet [default: off]")
1156 +# OPTION(WITH_VALGRIND "with internal support for valgrind [default: off]")
1157 +# OPTION(WITH_KERBEROS5 "use Kerberos5 support with OpenSSL [default: off]")
1158 +OPTION(WITH_FAM "fam/gamin for reducing number of stat() calls [default: off]")
1159 +OPTION(WITH_GDBM "gdbm storage for mod_trigger_b4_dl [default: off]")
1160 +OPTION(WITH_MEMCACHE "memcached storage for mod_trigger_b4_dl [default: off]")
1162 +OPTION(BUILD_STATIC "build a static lighttpd with all modules added")
1165 + SET(LIGHTTPD_STATIC 1)
1167 + SET(CMAKE_SHARED_LIBRARY_PREFIX "")
1168 +ENDIF(BUILD_STATIC)
1170 +IF(WITH_WEBDAV_PROPS)
1172 + SET(WITH_SQLITE3 1)
1174 +ENDIF(WITH_WEBDAV_PROPS)
1176 +CHECK_INCLUDE_FILES(sys/devpoll.h HAVE_SYS_DEVPOLL_H)
1177 +CHECK_INCLUDE_FILES(sys/epoll.h HAVE_SYS_EPOLL_H)
1178 +CHECK_INCLUDE_FILES(sys/event.h HAVE_SYS_EVENT_H)
1179 +CHECK_INCLUDE_FILES(sys/mman.h HAVE_SYS_MMAN_H)
1180 +CHECK_INCLUDE_FILES(sys/poll.h HAVE_SYS_POLL_H)
1181 +CHECK_INCLUDE_FILES(sys/port.h HAVE_SYS_PORT_H)
1182 +CHECK_INCLUDE_FILES(sys/prctl.h HAVE_SYS_PRCTL_H)
1183 +CHECK_INCLUDE_FILES(sys/resource.h HAVE_SYS_RESOURCE_H)
1184 +CHECK_INCLUDE_FILES(sys/sendfile.h HAVE_SYS_SENDFILE_H)
1185 +CHECK_INCLUDE_FILES(sys/select.h HAVE_SYS_SELECT_H)
1186 +CHECK_INCLUDE_FILES(sys/syslimits.h HAVE_SYS_SYSLIMITS_H)
1187 +CHECK_INCLUDE_FILES(sys/types.h HAVE_SYS_TYPES_H)
1188 +CHECK_INCLUDE_FILES(sys/uio.h HAVE_SYS_UIO_H)
1189 +CHECK_INCLUDE_FILES(sys/un.h HAVE_SYS_UN_H)
1190 +CHECK_INCLUDE_FILES(sys/wait.h HAVE_SYS_WAIT_H)
1191 +CHECK_INCLUDE_FILES(sys/time.h HAVE_SYS_TIME_H)
1192 +CHECK_INCLUDE_FILES(unistd.h HAVE_UNISTD_H)
1193 +CHECK_INCLUDE_FILES(pthread.h HAVE_PTHREAD_H)
1194 +CHECK_INCLUDE_FILES(getopt.h HAVE_GETOPT_H)
1195 +CHECK_INCLUDE_FILES(inttypes.h HAVE_INTTYPES_H)
1196 +CHECK_INCLUDE_FILES(poll.h HAVE_POLL_H)
1197 +CHECK_INCLUDE_FILES(pwd.h HAVE_PWD_H)
1198 +CHECK_INCLUDE_FILES(stddef.h HAVE_STDDEF_H)
1199 +CHECK_INCLUDE_FILES(stdint.h HAVE_STDINT_H)
1200 +CHECK_INCLUDE_FILES(syslog.h HAVE_SYSLOG_H)
1202 +# check for fastcgi lib, for the tests only
1203 +CHECK_INCLUDE_FILES(fastcgi.h HAVE_FASTCGI_H)
1204 +CHECK_INCLUDE_FILES(fastcgi/fastcgi.h HAVE_FASTCGI_FASTCGI_H)
1206 +CHECK_INCLUDE_FILES(crypt.h HAVE_CRYPT_H)
1208 + ## check if we need libcrypt for crypt()
1209 + CHECK_LIBRARY_EXISTS(crypt crypt "" HAVE_LIBCRYPT)
1210 +ENDIF(HAVE_CRYPT_H)
1212 +CHECK_INCLUDE_FILES(sys/inotify.h HAVE_SYS_INOTIFY_H)
1213 +IF(HAVE_SYS_INOTIFY_H)
1214 + CHECK_FUNCTION_EXISTS(inotify_init HAVE_INOTIFY_INIT)
1215 +ENDIF(HAVE_SYS_INOTIFY_H)
1217 +SET(CMAKE_EXTRA_INCLUDE_FILES sys/socket.h)
1218 +CHECK_TYPE_SIZE(socklen_t HAVE_SOCKLEN_T)
1219 +SET(CMAKE_EXTRA_INCLUDE_FILES)
1221 +CHECK_TYPE_SIZE(long SIZEOF_LONG)
1222 +CHECK_TYPE_SIZE(off_t SIZEOF_OFF_T)
1224 +CHECK_FUNCTION_EXISTS(chroot HAVE_CHROOT)
1225 +CHECK_FUNCTION_EXISTS(crypt HAVE_CRYPT)
1226 +CHECK_FUNCTION_EXISTS(epoll_ctl HAVE_EPOLL_CTL)
1227 +CHECK_FUNCTION_EXISTS(fork HAVE_FORK)
1228 +CHECK_FUNCTION_EXISTS(getrlimit HAVE_GETRLIMIT)
1229 +CHECK_FUNCTION_EXISTS(getuid HAVE_GETUID)
1230 +CHECK_FUNCTION_EXISTS(gmtime_r HAVE_GMTIME_R)
1231 +CHECK_FUNCTION_EXISTS(inet_ntop HAVE_INET_NTOP)
1232 +CHECK_FUNCTION_EXISTS(kqueue HAVE_KQUEUE)
1233 +CHECK_FUNCTION_EXISTS(localtime_r HAVE_LOCALTIME_R)
1234 +CHECK_FUNCTION_EXISTS(lstat HAVE_LSTAT)
1235 +CHECK_FUNCTION_EXISTS(madvise HAVE_MADVISE)
1236 +CHECK_FUNCTION_EXISTS(memcpy HAVE_MEMCPY)
1237 +CHECK_FUNCTION_EXISTS(memset HAVE_MEMSET)
1238 +CHECK_FUNCTION_EXISTS(mmap HAVE_MMAP)
1239 +CHECK_FUNCTION_EXISTS(pathconf HAVE_PATHCONF)
1240 +CHECK_FUNCTION_EXISTS(poll HAVE_POLL)
1241 +CHECK_FUNCTION_EXISTS(port_create HAVE_PORT_CREATE)
1242 +CHECK_FUNCTION_EXISTS(prctl HAVE_PRCTL)
1243 +CHECK_FUNCTION_EXISTS(pread HAVE_PREAD)
1244 +CHECK_FUNCTION_EXISTS(posix_fadvise HAVE_POSIX_FADVISE)
1245 +CHECK_FUNCTION_EXISTS(select HAVE_SELECT)
1246 +CHECK_FUNCTION_EXISTS(sendfile HAVE_SENDFILE)
1247 +CHECK_FUNCTION_EXISTS(send_file HAVE_SEND_FILE)
1248 +CHECK_FUNCTION_EXISTS(sendfile64 HAVE_SENDFILE64)
1249 +CHECK_FUNCTION_EXISTS(sendfilev HAVE_SENDFILEV)
1250 +CHECK_FUNCTION_EXISTS(sigaction HAVE_SIGACTION)
1251 +CHECK_FUNCTION_EXISTS(signal HAVE_SIGNAL)
1252 +CHECK_FUNCTION_EXISTS(sigtimedwait HAVE_SIGTIMEDWAIT)
1253 +CHECK_FUNCTION_EXISTS(strptime HAVE_STRPTIME)
1254 +CHECK_FUNCTION_EXISTS(syslog HAVE_SYSLOG)
1255 +CHECK_FUNCTION_EXISTS(writev HAVE_WRITEV)
1256 +CHECK_FUNCTION_EXISTS(inet_aton HAVE_INET_ATON)
1257 +CHECK_C_SOURCE_COMPILES("
1258 + #include <sys/types.h>
1259 + #include <sys/socket.h>
1260 + #include <netinet/in.h>
1263 + struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] = 0;
1268 +MACRO(XCONFIG _package _include_DIR _link_DIR _link_FLAGS _cflags)
1269 +# reset the variables at the beginning
1270 + SET(${_include_DIR})
1272 + SET(${_link_FLAGS})
1275 + FIND_PROGRAM(${_package}CONFIG_EXECUTABLE NAMES ${_package} PATHS /usr/local/bin )
1277 + # if pkg-config has been found
1278 + IF(${_package}CONFIG_EXECUTABLE)
1279 + SET(XCONFIG_EXECUTABLE "${${_package}CONFIG_EXECUTABLE}")
1280 + MESSAGE(STATUS "found ${_package}: ${XCONFIG_EXECUTABLE}")
1282 + EXEC_PROGRAM(${XCONFIG_EXECUTABLE} ARGS --libs OUTPUT_VARIABLE __link_FLAGS)
1283 + STRING(REPLACE "\n" "" ${_link_FLAGS} ${__link_FLAGS})
1284 + EXEC_PROGRAM(${XCONFIG_EXECUTABLE} ARGS --cflags OUTPUT_VARIABLE __cflags)
1285 + STRING(REPLACE "\n" "" ${_cflags} ${__cflags})
1287 + ELSE(${_package}CONFIG_EXECUTABLE)
1288 + MESSAGE(STATUS "found ${_package}: no")
1289 + ENDIF(${_package}CONFIG_EXECUTABLE)
1290 +ENDMACRO(XCONFIG _package _include_DIR _link_DIR _link_FLAGS _cflags)
1293 + CHECK_INCLUDE_FILES(attr/attributes.h HAVE_ATTR_ATTRIBUTES_H)
1294 + CHECK_LIBRARY_EXISTS(attr attr_get "" HAVE_XATTR)
1298 + XCONFIG(mysql_config MYSQL_INCDIR MYSQL_LIBDIR MYSQL_LDFLAGS MYSQL_CFLAGS)
1300 + SET(CMAKE_REQUIRED_INCLUDES /usr/include/mysql)
1301 + CHECK_INCLUDE_FILES(mysql.h HAVE_MYSQL_H)
1302 + SET(CMAKE_REQUIRED_INCLUDES)
1304 + CHECK_LIBRARY_EXISTS(mysqlclient mysql_real_connect "" HAVE_MYSQL)
1305 + ENDIF(HAVE_MYSQL_H)
1309 + CHECK_INCLUDE_FILES(openssl/ssl.h HAVE_OPENSSL_SSL_H)
1310 + IF(HAVE_OPENSSL_SSL_H)
1311 + CHECK_LIBRARY_EXISTS(crypto BIO_f_base64 "" HAVE_LIBCRYPTO)
1312 + IF(HAVE_LIBCRYPTO)
1313 + SET(OPENSSL_NO_KRB5 1)
1314 + CHECK_LIBRARY_EXISTS(ssl SSL_new "" HAVE_LIBSSL)
1315 + ENDIF(HAVE_LIBCRYPTO)
1316 + ENDIF(HAVE_OPENSSL_SSL_H)
1317 +ENDIF(WITH_OPENSSL)
1320 + ## if we have pcre-config, use it
1321 + XCONFIG(pcre-config PCRE_INCDIR PCRE_LIBDIR PCRE_LDFLAGS PCRE_CFLAGS)
1322 + IF(PCRE_LDFLAGS OR PCRE_CFLAGS)
1323 + MESSAGE(STATUS "found pcre at: LDFLAGS: ${PCRE_LDFLAGS} CFLAGS: ${PCRE_CFLAGS}")
1325 + IF(NOT PCRE_CFLAGS STREQUAL "\n")
1326 + ## if it is empty we'll get newline returned
1327 + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PCRE_CFLAGS}")
1328 + ENDIF(NOT PCRE_CFLAGS STREQUAL "\n")
1330 + SET(HAVE_PCRE_H 1)
1331 + SET(HAVE_LIBPCRE 1)
1332 + ELSE(PCRE_LDFLAGS OR PCRE_CFLAGS)
1334 + CHECK_INCLUDE_FILES(pcre.h HAVE_PCRE_H)
1335 + CHECK_LIBRARY_EXISTS(pcre pcre_exec "" HAVE_LIBPCRE)
1336 + SET(PCRE_LDFLAGS -lpcre)
1338 + FIND_PATH(PCRE_INCLUDE_DIR pcre.h
1339 + /usr/local/include
1343 + SET(PCRE_NAMES pcre)
1344 + FIND_LIBRARY(PCRE_LIBRARY
1345 + NAMES ${PCRE_NAMES}
1346 + PATHS /usr/lib /usr/local/lib
1349 + IF(PCRE_INCLUDE_DIR AND PCRE_LIBRARY)
1350 + SET(CMAKE_REQUIRED_INCLUDES ${PCRE_INCLUDE_DIR})
1351 + SET(CMAKE_REQUIRED_LIBRARIES ${PCRE_LIBRARY})
1352 + CHECK_INCLUDE_FILES(pcre.h HAVE_PCRE_H)
1353 + CHECK_LIBRARY_EXISTS(pcre pcre_exec "" HAVE_LIBPCRE)
1354 + SET(CMAKE_REQUIRED_INCLUDES)
1355 + SET(CMAKE_REQUIRED_LIBRARIES)
1356 + INCLUDE_DIRECTORIES(${PCRE_INCLUDE_DIR})
1357 + ENDIF(PCRE_INCLUDE_DIR AND PCRE_LIBRARY)
1359 + ENDIF(PCRE_LDFLAGS OR PCRE_CFLAGS)
1361 + IF(NOT HAVE_PCRE_H)
1362 + MESSAGE(FATAL_ERROR "pcre.h couldn't be found")
1363 + ENDIF(NOT HAVE_PCRE_H)
1364 + IF(NOT HAVE_LIBPCRE)
1365 + MESSAGE(FATAL_ERROR "libpcre couldn't be found")
1366 + ENDIF(NOT HAVE_LIBPCRE)
1372 + XCONFIG(xml2-config XML2_INCDIR XML2_LIBDIR XML2_LDFLAGS XML2_CFLAGS)
1373 + IF(XML2_LDFLAGS OR XML2_CFLAGS)
1374 + MESSAGE(STATUS "found xml2 at: LDFLAGS: ${XML2_LDFLAGS} CFLAGS: ${XML2_CFLAGS}")
1376 + ## if it is empty we'll get newline returned
1377 + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${XML2_CFLAGS}")
1379 + CHECK_INCLUDE_FILES(libxml/tree.h HAVE_LIBXML_H)
1381 + SET(CMAKE_REQUIRED_FLAGS ${XML2_LDFLAGS})
1382 + CHECK_LIBRARY_EXISTS(xml2 xmlParseChunk "" HAVE_LIBXML)
1383 + SET(CMAKE_REQUIRED_FLAGS)
1384 + ELSE(XML2_LDFLAGS OR XML2_CFLAGS)
1385 + CHECK_INCLUDE_FILES(libxml.h HAVE_LIBXML_H)
1386 + CHECK_LIBRARY_EXISTS(xml2 xmlParseChunk "" HAVE_LIBXML)
1387 + ENDIF(XML2_LDFLAGS OR XML2_CFLAGS)
1389 + IF(NOT HAVE_LIBXML_H)
1390 + MESSAGE(FATAL_ERROR "libxml/tree.h couldn't be found")
1391 + ENDIF(NOT HAVE_LIBXML_H)
1392 + IF(NOT HAVE_LIBXML)
1393 + MESSAGE(FATAL_ERROR "libxml2 couldn't be found")
1394 + ENDIF(NOT HAVE_LIBXML)
1399 + CHECK_INCLUDE_FILES(sqlite3.h HAVE_SQLITE3_H)
1400 + CHECK_LIBRARY_EXISTS(sqlite3 sqlite3_reset "" HAVE_SQLITE3)
1401 +ENDIF(WITH_SQLITE3)
1404 + CHECK_INCLUDE_FILES(uuid/uuid.h HAVE_UUID_UUID_H)
1405 + CHECK_LIBRARY_EXISTS(uuid uuid_generate "" NEED_LIBUUID)
1406 + IF(NOT NEED_LIBUUID)
1407 + CHECK_FUNCTION_EXISTS(uuid_generate HAVE_LIBUUID)
1408 + ELSE(NOT NEED_LIBUUID)
1409 + SET(HAVE_LIBUUID 1)
1410 + ENDIF(NOT NEED_LIBUUID)
1415 + CHECK_INCLUDE_FILES(zlib.h HAVE_ZLIB_H)
1416 + CHECK_LIBRARY_EXISTS(z deflate "" HAVE_LIBZ)
1417 + SET(ZLIB_LIBRARY z)
1419 + FIND_PATH(ZLIB_INCLUDE_DIR zlib.h
1420 + /usr/local/include
1424 + SET(ZLIB_NAMES z zlib zdll)
1425 + FIND_LIBRARY(ZLIB_LIBRARY
1426 + NAMES ${ZLIB_NAMES}
1427 + PATHS /usr/lib /usr/local/lib
1431 + IF(ZLIB_INCLUDE_DIR AND ZLIB_LIBRARY)
1432 + SET(CMAKE_REQUIRED_INCLUDES ${ZLIB_INCLUDE_DIR})
1433 + SET(CMAKE_REQUIRED_LIBRARIES ${ZLIB_LIBRARY})
1434 + GET_FILENAME_COMPONENT(ZLIB_NAME ${ZLIB_LIBRARY} NAME)
1435 + CHECK_INCLUDE_FILES(zlib.h HAVE_ZLIB_H)
1436 + CHECK_LIBRARY_EXISTS(${ZLIB_NAME} deflate "" HAVE_LIBZ)
1437 + SET(CMAKE_REQUIRED_INCLUDES)
1438 + SET(CMAKE_REQUIRED_LIBRARIES)
1439 + INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
1441 + ENDIF(ZLIB_INCLUDE_DIR AND ZLIB_LIBRARY)
1446 + CHECK_INCLUDE_FILES(bzlib.h HAVE_BZLIB_H)
1447 + CHECK_LIBRARY_EXISTS(bz2 BZ2_bzCompress "" HAVE_LIBBZ2)
1451 + CHECK_INCLUDE_FILES(ldap.h HAVE_LDAP_H)
1452 + CHECK_LIBRARY_EXISTS(ldap ldap_bind "" HAVE_LIBLDAP)
1453 + CHECK_INCLUDE_FILES(lber.h HAVE_LBER_H)
1454 + CHECK_LIBRARY_EXISTS(lber ber_printf "" HAVE_LIBLBER)
1455 + SET(LDAP_DEPRECATED 1) # Using deprecated ldap api
1459 + pkg_search_module(LUA REQUIRED lua lua5.1)
1460 + MESSAGE(STATUS "found lua at: INCDIR: ${LUA_INCLUDE_DIRS} LIBDIR: ${LUA_LIBRARY_DIRS} LDFLAGS: ${LUA_LDFLAGS} CFLAGS: ${LUA_CFLAGS}")
1461 + SET(HAVE_LIBLUA 1 "Have liblua")
1462 + SET(HAVE_LUA_H 1 "Have liblua header")
1466 + CHECK_INCLUDE_FILES(fam.h HAVE_FAM_H)
1467 + CHECK_LIBRARY_EXISTS(fam FAMOpen2 "" HAVE_LIBFAM)
1469 + SET(CMAKE_REQUIRED_LIBRARIES fam)
1470 + CHECK_FUNCTION_EXISTS(FAMNoExists HAVE_FAMNOEXISTS)
1471 + ENDIF(HAVE_LIBFAM)
1475 + CHECK_INCLUDE_FILES(gdbm.h HAVE_GDBM_H)
1476 + CHECK_LIBRARY_EXISTS(gdbm gdbm_open "" HAVE_GDBM)
1480 + CHECK_INCLUDE_FILES(memcache.h HAVE_MEMCACHE_H)
1481 + CHECK_LIBRARY_EXISTS(memcache mc_new "" HAVE_MEMCACHE)
1482 +ENDIF(WITH_MEMCACHE)
1484 +IF(NOT BUILD_STATIC)
1485 + CHECK_INCLUDE_FILES(dlfcn.h HAVE_DLFCN_H)
1486 +ENDIF(NOT BUILD_STATIC)
1489 + CHECK_LIBRARY_EXISTS(dl dlopen "" HAVE_LIBDL)
1490 +ENDIF(HAVE_DLFCN_H)
1493 + -DLIGHTTPD_VERSION_ID=10400
1494 + -DPACKAGE_NAME="\\"${CMAKE_PROJECT_NAME}\\""
1495 + -DPACKAGE_VERSION="\\"${CPACK_PACKAGE_VERSION}\\""
1496 + -DPACKAGE_BUILD_DATE="\\"-\\""
1500 + SET(SBINDIR "sbin")
1503 +IF(NOT LIGHTTPD_MODULES_DIR)
1504 + SET(LIGHTTPD_MODULES_DIR "lib${LIB_SUFFIX}/lighttpd")
1505 +ENDIF(NOT LIGHTTPD_MODULES_DIR)
1509 + -DLIBRARY_DIR="\\"${CMAKE_INSTALL_PREFIX}/${LIGHTTPD_MODULES_DIR}\\""
1512 +## We use relative path in windows
1514 + -DLIBRARY_DIR="\\"lib\\""
1518 +## Write out config.h
1519 +CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
1521 +ADD_DEFINITIONS(-DHAVE_CONFIG_H)
1523 +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
1527 + keyvalue.c chunk.c
1528 + http_chunk.c stream.c fdevent.c
1529 + stat_cache.c plugin.c joblist.c etag.c array.c
1530 + data_string.c data_count.c data_array.c
1531 + data_integer.c md5.c data_fastcgi.c
1532 + fdevent_select.c fdevent_linux_rtsig.c
1533 + fdevent_poll.c fdevent_linux_sysepoll.c
1534 + fdevent_solaris_devpoll.c fdevent_freebsd_kqueue.c
1535 + data_config.c bitset.c
1536 + inet_ntop_cache.c crc32.c
1537 + connections-glue.c
1539 + http-header-glue.c
1540 + splaytree.c network_writev.c
1541 + network_write.c network_linux_sendfile.c
1542 + network_freebsd_sendfile.c
1543 + network_solaris_sendfilev.c network_openssl.c
1548 + MESSAGE(STATUS "Adding local getopt implementation.")
1549 + SET(COMMON_SRC ${COMMON_SRC} xgetopt.c)
1552 +ADD_EXECUTABLE(lemon lemon.c)
1554 +## Build parsers by using lemon...
1555 +LEMON_PARSER(configparser.y)
1556 +LEMON_PARSER(mod_ssi_exprparser.y)
1558 +SET(L_INSTALL_TARGETS)
1560 +ADD_EXECUTABLE(spawn-fcgi spawn-fcgi.c)
1561 +SET(L_INSTALL_TARGETS ${L_INSTALL_TARGETS} spawn-fcgi)
1563 +ADD_EXECUTABLE(lighttpd
1574 +SET(L_INSTALL_TARGETS ${L_INSTALL_TARGETS} lighttpd)
1576 +ADD_AND_INSTALL_LIBRARY(mod_access mod_access.c)
1577 +ADD_AND_INSTALL_LIBRARY(mod_accesslog mod_accesslog.c)
1578 +ADD_AND_INSTALL_LIBRARY(mod_alias mod_alias.c)
1579 +ADD_AND_INSTALL_LIBRARY(mod_auth "mod_auth.c;http_auth_digest.c;http_auth.c")
1581 +ADD_AND_INSTALL_LIBRARY(mod_cgi mod_cgi.c)
1583 +ADD_AND_INSTALL_LIBRARY(mod_cml "mod_cml.c;mod_cml_lua.c;mod_cml_funcs.c")
1584 +ADD_AND_INSTALL_LIBRARY(mod_compress mod_compress.c)
1585 +ADD_AND_INSTALL_LIBRARY(mod_dirlisting mod_dirlisting.c)
1586 +ADD_AND_INSTALL_LIBRARY(mod_evasive mod_evasive.c)
1587 +ADD_AND_INSTALL_LIBRARY(mod_evhost mod_evhost.c)
1588 +ADD_AND_INSTALL_LIBRARY(mod_expire mod_expire.c)
1589 +ADD_AND_INSTALL_LIBRARY(mod_extforward mod_extforward.c)
1590 +ADD_AND_INSTALL_LIBRARY(mod_fastcgi mod_fastcgi.c)
1591 +ADD_AND_INSTALL_LIBRARY(mod_flv_streaming mod_flv_streaming.c)
1592 +ADD_AND_INSTALL_LIBRARY(mod_indexfile mod_indexfile.c)
1593 +ADD_AND_INSTALL_LIBRARY(mod_magnet "mod_magnet.c;mod_magnet_cache.c")
1594 +ADD_AND_INSTALL_LIBRARY(mod_mysql_vhost mod_mysql_vhost.c)
1595 +ADD_AND_INSTALL_LIBRARY(mod_proxy mod_proxy.c)
1596 +ADD_AND_INSTALL_LIBRARY(mod_redirect mod_redirect.c)
1597 +ADD_AND_INSTALL_LIBRARY(mod_rewrite mod_rewrite.c)
1598 +ADD_AND_INSTALL_LIBRARY(mod_rrdtool mod_rrdtool.c)
1599 +ADD_AND_INSTALL_LIBRARY(mod_scgi mod_scgi.c)
1600 +ADD_AND_INSTALL_LIBRARY(mod_secdownload mod_secure_download.c)
1601 +ADD_AND_INSTALL_LIBRARY(mod_setenv mod_setenv.c)
1602 +ADD_AND_INSTALL_LIBRARY(mod_simple_vhost mod_simple_vhost.c)
1603 +ADD_AND_INSTALL_LIBRARY(mod_ssi "mod_ssi_exprparser.c;mod_ssi_expr.c;mod_ssi.c")
1604 +ADD_AND_INSTALL_LIBRARY(mod_staticfile mod_staticfile.c)
1605 +ADD_AND_INSTALL_LIBRARY(mod_status mod_status.c)
1606 +ADD_AND_INSTALL_LIBRARY(mod_trigger_b4_dl mod_trigger_b4_dl.c)
1607 +ADD_AND_INSTALL_LIBRARY(mod_uploadprogress mod_uploadprogress.c)
1608 +ADD_AND_INSTALL_LIBRARY(mod_userdir mod_userdir.c)
1609 +ADD_AND_INSTALL_LIBRARY(mod_usertrack mod_usertrack.c)
1610 +ADD_AND_INSTALL_LIBRARY(mod_webdav mod_webdav.c)
1613 + ADD_TARGET_PROPERTIES(lighttpd LINK_FLAGS ${PCRE_LDFLAGS})
1614 + ADD_TARGET_PROPERTIES(lighttpd COMPILE_FLAGS ${PCRE_CFLAGS})
1615 + ADD_TARGET_PROPERTIES(mod_rewrite LINK_FLAGS ${PCRE_LDFLAGS})
1616 + ADD_TARGET_PROPERTIES(mod_rewrite COMPILE_FLAGS ${PCRE_CFLAGS})
1617 + ADD_TARGET_PROPERTIES(mod_dirlisting LINK_FLAGS ${PCRE_LDFLAGS})
1618 + ADD_TARGET_PROPERTIES(mod_dirlisting COMPILE_FLAGS ${PCRE_CFLAGS})
1619 + ADD_TARGET_PROPERTIES(mod_redirect LINK_FLAGS ${PCRE_LDFLAGS})
1620 + ADD_TARGET_PROPERTIES(mod_redirect COMPILE_FLAGS ${PCRE_CFLAGS})
1621 + ADD_TARGET_PROPERTIES(mod_ssi LINK_FLAGS ${PCRE_LDFLAGS})
1622 + ADD_TARGET_PROPERTIES(mod_ssi COMPILE_FLAGS ${PCRE_CFLAGS})
1623 + ADD_TARGET_PROPERTIES(mod_trigger_b4_dl LINK_FLAGS ${PCRE_LDFLAGS})
1624 + ADD_TARGET_PROPERTIES(mod_trigger_b4_dl COMPILE_FLAGS ${PCRE_CFLAGS})
1627 +ADD_TARGET_PROPERTIES(mod_magnet LINK_FLAGS ${LUA_LDFLAGS})
1628 +ADD_TARGET_PROPERTIES(mod_magnet COMPILE_FLAGS ${LUA_CFLAGS})
1630 +ADD_TARGET_PROPERTIES(mod_cml LINK_FLAGS ${LUA_LDFLAGS})
1631 +ADD_TARGET_PROPERTIES(mod_cml COMPILE_FLAGS ${LUA_CFLAGS})
1633 +IF(HAVE_MYSQL_H AND HAVE_LIBMYSQL)
1634 + TARGET_LINK_LIBRARIES(mod_mysql_vhost mysqlclient)
1635 + INCLUDE_DIRECTORIES(/usr/include/mysql)
1636 +ENDIF(HAVE_MYSQL_H AND HAVE_LIBMYSQL)
1640 + SET(L_MOD_WEBDAV ${L_MOD_WEBDAV} sqlite3)
1641 +ENDIF(HAVE_SQLITE3_H)
1643 + SET_TARGET_PROPERTIES(mod_webdav PROPERTIES LINK_FLAGS ${XML2_LDFLAGS})
1644 +ENDIF(HAVE_LIBXML_H)
1647 + SET(L_MOD_WEBDAV ${L_MOD_WEBDAV} uuid)
1648 + ENDIF(NEED_LIBUUID)
1651 +TARGET_LINK_LIBRARIES(mod_webdav ${L_MOD_WEBDAV})
1655 + SET(L_MOD_AUTH ${L_MOD_AUTH} crypt)
1656 +ENDIF(HAVE_LIBCRYPT)
1659 + SET(L_MOD_AUTH ${L_MOD_AUTH} ldap lber)
1661 +TARGET_LINK_LIBRARIES(mod_auth ${L_MOD_AUTH})
1665 + TARGET_LINK_LIBRARIES(mod_compress ${ZLIB_LIBRARY} bz2)
1666 + ELSE(HAVE_BZLIB_H)
1667 + TARGET_LINK_LIBRARIES(mod_compress ${ZLIB_LIBRARY})
1668 + ENDIF(HAVE_BZLIB_H)
1672 + TARGET_LINK_LIBRARIES(lighttpd fam)
1676 + TARGET_LINK_LIBRARIES(mod_trigger_b4_dl gdbm)
1679 +IF(HAVE_MEMCACHE_H)
1680 + TARGET_LINK_LIBRARIES(mod_trigger_b4_dl memcache)
1681 +ENDIF(HAVE_MEMCACHE_H)
1683 +IF(CMAKE_COMPILER_IS_GNUCC)
1684 + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -Wall -g -Wshadow -W -pedantic")
1685 + SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O2")
1686 + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0")
1687 + SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_WITHDEBINFO} -O2")
1688 + ADD_DEFINITIONS(-D_GNU_SOURCE)
1689 +ENDIF(CMAKE_COMPILER_IS_GNUCC)
1691 +SET_TARGET_PROPERTIES(lighttpd PROPERTIES CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
1694 + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNVALGRIND")
1695 + ADD_TARGET_PROPERTIES(lighttpd COMPILE_FLAGS "-DLI_DECLARE_EXPORTS")
1696 + TARGET_LINK_LIBRARIES(lighttpd ws2_32)
1697 + TARGET_LINK_LIBRARIES(mod_proxy ws2_32)
1698 + TARGET_LINK_LIBRARIES(mod_fcgi ws2_32)
1699 + TARGET_LINK_LIBRARIES(mod_scgi ws2_32)
1700 + TARGET_LINK_LIBRARIES(mod_ssi ws2_32)
1703 + TARGET_LINK_LIBRARIES(lighttpd msvcr70)
1704 + ADD_TARGET_PROPERTIES(lighttpd LINK_FLAGS "-Wl,-subsystem,console")
1708 +IF(NOT BUILD_STATIC)
1710 + TARGET_LINK_LIBRARIES(lighttpd dl)
1712 +ENDIF(NOT BUILD_STATIC)
1714 +IF(HAVE_LIBSSL AND HAVE_LIBCRYPTO)
1715 + TARGET_LINK_LIBRARIES(lighttpd ssl)
1716 + TARGET_LINK_LIBRARIES(lighttpd crypto)
1717 +ENDIF(HAVE_LIBSSL AND HAVE_LIBCRYPTO)
1720 +INSTALL(TARGETS ${L_INSTALL_TARGETS}
1721 + RUNTIME DESTINATION ${SBINDIR}
1722 + LIBRARY DESTINATION ${LIGHTTPD_MODULES_DIR}
1723 + ARCHIVE DESTINATION ${LIGHTTPD_MODULES_DIR}/static)
1725 +## HACK to make win32 to install our libraries in desired directory..
1726 +INSTALL(TARGETS lighttpd
1727 + RUNTIME DESTINATION ${SBINDIR}
1728 + ARCHIVE DESTINATION lib/static)
1729 +LIST(REMOVE_ITEM L_INSTALL_TARGETS lighttpd)
1730 +INSTALL(TARGETS ${L_INSTALL_TARGETS}
1731 + RUNTIME DESTINATION ${SBINDIR}/lib
1732 + LIBRARY DESTINATION lib
1733 + ARCHIVE DESTINATION lib/static)
1735 Index: src/mod_accesslog.c
1736 ===================================================================
1737 --- src/mod_accesslog.c (.../tags/lighttpd-1.4.20) (revision 2371)
1738 +++ src/mod_accesslog.c (.../branches/lighttpd-1.4.x) (revision 2371)
1741 return HANDLER_ERROR;
1744 fcntl(s->log_access_fd, F_SETFD, FD_CLOEXEC);
1749 return HANDLER_GO_ON;
1752 return HANDLER_ERROR;
1755 + fcntl(s->log_access_fd, F_SETFD, FD_CLOEXEC);
1760 Index: src/fdevent_linux_sysepoll.c
1761 ===================================================================
1762 --- src/fdevent_linux_sysepoll.c (.../tags/lighttpd-1.4.20) (revision 2371)
1763 +++ src/fdevent_linux_sysepoll.c (.../branches/lighttpd-1.4.x) (revision 2371)
1765 if (e & EPOLLHUP) events |= FDEVENT_HUP;
1766 if (e & EPOLLPRI) events |= FDEVENT_PRI;
1772 static int fdevent_linux_sysepoll_event_get_fd(fdevents *ev, size_t ndx) {
1774 ===================================================================
1775 --- src/log.c (.../tags/lighttpd-1.4.20) (revision 2371)
1776 +++ src/log.c (.../branches/lighttpd-1.4.x) (revision 2371)
1777 @@ -146,6 +146,10 @@
1778 /* ok, new log is open, close the old one */
1779 close(srv->errorlog_fd);
1780 srv->errorlog_fd = new_fd;
1782 + /* close fd on exec (cgi) */
1783 + fcntl(srv->errorlog_fd, F_SETFD, FD_CLOEXEC);
1788 Index: src/proc_open.c
1789 ===================================================================
1790 --- src/proc_open.c (.../tags/lighttpd-1.4.20) (revision 2371)
1791 +++ src/proc_open.c (.../branches/lighttpd-1.4.x) (revision 2371)
1792 @@ -287,32 +287,33 @@
1795 /* {{{ proc_open_buffer */
1796 -int proc_open_buffer(proc_handler_t *proc, const char *command, buffer *in, buffer *out, buffer *err) {
1797 +int proc_open_buffer(const char *command, buffer *in, buffer *out, buffer *err) {
1798 + proc_handler_t proc;
1802 - if (proc_open(proc, command) != 0) {
1803 + if (proc_open(&proc, command) != 0) {
1808 - if (write(proc->in.fd, (void *)in->ptr, in->used) < 0) {
1809 + if (write(proc.in.fd, (void *)in->ptr, in->used) < 0) {
1810 perror("error writing pipe");
1814 - pipe_close(&proc->in);
1815 + pipe_close(&proc.in);
1818 - proc_read_fd_to_buffer(proc->out.fd, out);
1819 + proc_read_fd_to_buffer(proc.out.fd, out);
1821 - pipe_close(&proc->out);
1822 + pipe_close(&proc.out);
1825 - proc_read_fd_to_buffer(proc->err.fd, err);
1826 + proc_read_fd_to_buffer(proc.err.fd, err);
1828 - pipe_close(&proc->err);
1829 + pipe_close(&proc.err);
1831 + proc_close(&proc);
1839 fprintf(stdout, "test: echo 321 with read\n"); fflush(stdout);
1840 - if (proc_open_buffer(&proc, "echo 321", NULL, out, err) != 0) {
1841 + if (proc_open_buffer("echo 321", NULL, out, err) != 0) {
1844 fprintf(stdout, "result: ->%s<-\n\n", out->ptr); fflush(stdout);
1847 fprintf(stdout, "test: echo 123 | " CMD_CAT "\n"); fflush(stdout);
1848 buffer_copy_string_len(in, CONST_STR_LEN("123\n"));
1849 - if (proc_open_buffer(&proc, CMD_CAT, in, out, err) != 0) {
1850 + if (proc_open_buffer(CMD_CAT, in, out, err) != 0) {
1853 fprintf(stdout, "result: ->%s<-\n\n", out->ptr); fflush(stdout);
1854 Index: src/proc_open.h
1855 ===================================================================
1856 --- src/proc_open.h (.../tags/lighttpd-1.4.20) (revision 2371)
1857 +++ src/proc_open.h (.../branches/lighttpd-1.4.x) (revision 2371)
1860 int proc_close(proc_handler_t *ht);
1861 int proc_open(proc_handler_t *ht, const char *command);
1862 -int proc_open_buffer(proc_handler_t *ht, const char *command, buffer *in, buffer *out, buffer *err);
1863 +int proc_open_buffer(const char *command, buffer *in, buffer *out, buffer *err);
1864 Index: tests/mod-proxy.t
1865 ===================================================================
1866 --- tests/mod-proxy.t (.../tags/lighttpd-1.4.20) (revision 2371)
1867 +++ tests/mod-proxy.t (.../branches/lighttpd-1.4.x) (revision 2371)
1872 -use Test::More tests => 6;
1873 +use Test::More tests => 9;
1876 my $tf_real = LightyTest->new();
1877 my $tf_proxy = LightyTest->new();
1880 +my $php_child = -1;
1882 +my $phpbin = (defined $ENV{'PHP'} ? $ENV{'PHP'} : '/usr/bin/php-cgi');
1883 +$ENV{'PHP'} = $phpbin;
1886 + skip "PHP already running on port 1026", 1 if $tf_real->listening_on(1026);
1887 + skip "no php binary found", 1 unless -x $phpbin;
1888 + ok(-1 != ($php_child = $tf_real->spawnfcgi($phpbin, 1026)), "Spawning php");
1891 ## we need two procs
1892 ## 1. the real webserver
1893 ## 2. the proxy server
1895 $tf_proxy->{PORT} = 2050;
1896 $tf_proxy->{CONFIGFILE} = 'proxy.conf';
1898 -ok($tf_real->start_proc == 0, "Starting lighttpd") or die();
1899 +ok($tf_real->start_proc == 0, "Starting lighttpd") or goto cleanup;
1901 -ok($tf_proxy->start_proc == 0, "Starting lighttpd as proxy") or die();
1902 +ok($tf_proxy->start_proc == 0, "Starting lighttpd as proxy") or goto cleanup;
1904 $t->{REQUEST} = ( <<EOF
1905 GET /index.html HTTP/1.0
1907 $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'Server' => 'Apache 1.3.29' } ];
1908 ok($tf_proxy->handle_http($t) == 0, 'drop Server from real server');
1911 + skip "no PHP running on port 1026", 1 unless $tf_real->listening_on(1026);
1912 + $t->{REQUEST} = ( <<EOF
1913 +GET /rewrite/all/some+test%3axxx%20with%20space HTTP/1.0
1914 +Host: www.example.org
1917 + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => '/some+test%3axxx%20with%20space' } ];
1918 + ok($tf_proxy->handle_http($t) == 0, 'rewrited urls work with encoded path');
1921 ok($tf_proxy->stop_proc == 0, "Stopping lighttpd proxy");
1923 ok($tf_real->stop_proc == 0, "Stopping lighttpd");
1926 + skip "PHP not started, cannot stop it", 1 unless $php_child != -1;
1927 + ok(0 == $tf_real->endspawnfcgi($php_child), "Stopping php");
1935 +$tf_real->endspawnfcgi($php_child) if $php_child != -1;
1938 Index: tests/CMakeLists.txt
1939 ===================================================================
1940 --- tests/CMakeLists.txt (.../tags/lighttpd-1.4.20) (revision 0)
1941 +++ tests/CMakeLists.txt (.../branches/lighttpd-1.4.x) (revision 2371)
1946 + core-404-handler.t
1952 + core-var-include.t
1971 +FOREACH(it ${T_FILES})
1972 + ADD_TEST(${it} "${lighttpd_SOURCE_DIR}/tests/wrapper.sh"
1973 + "${lighttpd_SOURCE_DIR}/tests"
1974 + "${lighttpd_BINARY_DIR}"
1975 + "${lighttpd_SOURCE_DIR}/tests/${it}")
1977 Index: tests/SConscript
1978 ===================================================================
1979 --- tests/SConscript (.../tags/lighttpd-1.4.20) (revision 2371)
1980 +++ tests/SConscript (.../branches/lighttpd-1.4.x) (revision 2371)
1985 + mod-compress.conf \
1989 Index: tests/mod-compress.conf
1990 ===================================================================
1991 --- tests/mod-compress.conf (.../tags/lighttpd-1.4.20) (revision 0)
1992 +++ tests/mod-compress.conf (.../branches/lighttpd-1.4.x) (revision 2371)
1994 +debug.log-request-handling = "enable"
1995 +debug.log-response-header = "disable"
1996 +debug.log-request-header = "disable"
1998 +server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
1999 +server.pid-file = env.SRCDIR + "/tmp/lighttpd/lighttpd.pid"
2001 +## bind to port (default: 80)
2004 +## bind to localhost (default: all interfaces)
2005 +server.bind = "localhost"
2006 +server.errorlog = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.error.log"
2007 +server.name = "www.example.org"
2013 +######################## MODULE CONFIG ############################
2015 +mimetype.assign = (
2016 + ".html" => "text/html",
2017 + ".txt" => "text/plain",
2020 +$HTTP["host"] == "cache.example.org" {
2021 + compress.cache-dir = env.SRCDIR + "/tmp/lighttpd/cache/compress/"
2023 +compress.filetype = ("text/plain", "text/html")
2025 +compress.allowed-encodings = ( "gzip", "deflate" )
2026 Index: tests/mod-fastcgi.t
2027 ===================================================================
2028 --- tests/mod-fastcgi.t (.../tags/lighttpd-1.4.20) (revision 2371)
2029 +++ tests/mod-fastcgi.t (.../branches/lighttpd-1.4.x) (revision 2371)
2034 -use Test::More tests => 49;
2035 +use Test::More tests => 50;
2038 my $tf = LightyTest->new();
2043 - skip "no fcgi-auth found", 4 unless -x $tf->{BASEDIR}."/tests/fcgi-auth" || -x $tf->{BASEDIR}."/tests/fcgi-auth.exe";
2044 + skip "no fcgi-auth found", 5 unless -x $tf->{BASEDIR}."/tests/fcgi-auth" || -x $tf->{BASEDIR}."/tests/fcgi-auth.exe";
2046 $tf->{CONFIGFILE} = 'fastcgi-auth.conf';
2047 ok($tf->start_proc == 0, "Starting lighttpd with $tf->{CONFIGFILE}") or die();
2048 @@ -235,6 +235,14 @@
2049 $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 403 } ];
2050 ok($tf->handle_http($t) == 0, 'FastCGI - Auth');
2052 + $t->{REQUEST} = ( <<EOF
2053 +GET /expire/access.txt?ok HTTP/1.0
2054 +Host: www.example.org
2057 + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
2058 + ok($tf->handle_http($t) == 0, 'FastCGI - Auth in subdirectory');
2060 ok($tf->stop_proc == 0, "Stopping lighttpd");
2063 Index: tests/mod-rewrite.t
2064 ===================================================================
2065 --- tests/mod-rewrite.t (.../tags/lighttpd-1.4.20) (revision 2371)
2066 +++ tests/mod-rewrite.t (.../branches/lighttpd-1.4.x) (revision 2371)
2071 -use Test::More tests => 8;
2072 +use Test::More tests => 7;
2075 my $tf = LightyTest->new();
2078 $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => '' } ];
2079 ok($tf->handle_http($t) == 0, 'valid request');
2082 $t->{REQUEST} = ( <<EOF
2083 GET /rewrite/foo?a=b HTTP/1.0
2084 Host: www.example.org
2086 $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'bar&a=b' } ];
2087 ok($tf->handle_http($t) == 0, 'valid request');
2089 - $t->{REQUEST} = ( <<EOF
2090 -GET %2Frewrite/f%6Fo?a=b HTTP/1.0
2091 -Host: www.example.org
2094 - $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'a=b' } ];
2095 - ok($tf->handle_http($t) == 0, 'valid request with url encoded characters');
2097 ok($tf->stop_proc == 0, "Stopping lighttpd");
2100 Index: tests/fastcgi-auth.conf
2101 ===================================================================
2102 --- tests/fastcgi-auth.conf (.../tags/lighttpd-1.4.20) (revision 2371)
2103 +++ tests/fastcgi-auth.conf (.../branches/lighttpd-1.4.x) (revision 2371)
2105 "bin-path" => env.SRCDIR + "/fcgi-auth",
2106 "mode" => "authorizer",
2107 "docroot" => env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/",
2108 + "check-local" => "disable",
2112 Index: tests/proxy.conf
2113 ===================================================================
2114 --- tests/proxy.conf (.../tags/lighttpd-1.4.20) (revision 2371)
2115 +++ tests/proxy.conf (.../branches/lighttpd-1.4.x) (revision 2371)
2117 url.redirect = ( "^/redirect/$" => "http://localhost:2048/" )
2119 url.rewrite = ( "^/rewrite/foo($|\?.+)" => "/indexfile/rewrite.php$1",
2120 - "^/rewrite/bar(?:$|\?(.+))" => "/indexfile/rewrite.php?bar&$1" )
2121 + "^/rewrite/bar(?:$|\?(.+))" => "/indexfile/rewrite.php?bar&$1",
2122 + "^/rewrite/all(/.*)$" => "/indexfile/rewrite.php?$1" )
2124 expire.url = ( "/expire/access" => "access 2 hours",
2125 "/expire/modification" => "access plus 1 seconds 2 minutes")
2126 Index: tests/Makefile.am
2127 ===================================================================
2128 --- tests/Makefile.am (.../tags/lighttpd-1.4.20) (revision 2371)
2129 +++ tests/Makefile.am (.../branches/lighttpd-1.4.x) (revision 2371)
2134 + mod-compress.conf \
2138 Index: tests/mod-compress.t
2139 ===================================================================
2140 --- tests/mod-compress.t (.../tags/lighttpd-1.4.20) (revision 2371)
2141 +++ tests/mod-compress.t (.../branches/lighttpd-1.4.x) (revision 2371)
2146 -use Test::More tests => 10;
2147 +use Test::More tests => 11;
2150 my $tf = LightyTest->new();
2153 +$tf->{CONFIGFILE} = 'mod-compress.conf';
2155 ok($tf->start_proc == 0, "Starting lighttpd") or die();
2157 $t->{REQUEST} = ( <<EOF
2159 $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, '+Vary' => '', 'Content-Type' => "text/plain" } ];
2160 ok($tf->handle_http($t) == 0, 'Empty Accept-Encoding');
2162 +$t->{REQUEST} = ( <<EOF
2163 +GET /index.txt HTTP/1.0
2164 +Accept-Encoding: bzip2, gzip, deflate
2165 +Host: cache.example.org
2168 +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, '+Vary' => '', 'Content-Encoding' => 'gzip', 'Content-Type' => "text/plain" } ];
2169 +ok($tf->handle_http($t) == 0, 'bzip2 requested but disabled');
2172 ok($tf->stop_proc == 0, "Stopping lighttpd");
2173 Index: doc/redirect.txt
2174 ===================================================================
2175 --- doc/redirect.txt (.../tags/lighttpd-1.4.20) (revision 2371)
2176 +++ doc/redirect.txt (.../branches/lighttpd-1.4.x) (revision 2371)
2178 $HTTP["host"] =~ "^www\.(.*)" {
2179 url.redirect = ( "^/(.*)" => "http://%1/$1" )
2185 +Do NOT use mod_redirect to protect specific urls, as the original url passed from the client
2186 +is matched against your rules, for example strings like "/abc/../xyz%2f/path".
2187 Index: doc/compress.txt
2188 ===================================================================
2189 --- doc/compress.txt (.../tags/lighttpd-1.4.20) (revision 2371)
2190 +++ doc/compress.txt (.../branches/lighttpd-1.4.x) (revision 2371)
2192 Module: mod_compress
2193 --------------------
2195 -:Author: Jan Kneschke
2197 -:Revision: $Revision$
2200 - a nice, short abstrace about the module
2203 :keywords: lighttpd, compress
2208 Output compression reduces the network load and can improve the overall
2209 -throughput of the webserver.
2210 +throughput of the webserver. All major http-clients support compression by
2211 +announcing it in the Accept-Encoding header. This is used to negotiate the
2212 +most suitable compression method. We support deflate, gzip and bzip2.
2214 -Only static content is supported up to now.
2215 +deflate (RFC1950, RFC1951) and gzip (RFC1952) depend on zlib while bzip2
2216 +depends on libbzip2. bzip2 is only supported by lynx and some other console
2219 -The server negotiates automaticly which compression method is used.
2220 -Supported are gzip, deflate, bzip.
2221 +We currently limit to compression support to static files.
2226 +mod_compress can store compressed files on disk to optimize the compression
2227 +on a second request away. As soon as compress.cache-dir is set the files are
2230 +(You will need to create the cache directory if it doesn't already exist. The web server will not do this for you. The directory will also need the proper ownership. For Debian/Ubuntu the user and group ids should both be www-data.)
2232 +The names of the cache files are made of the filename, the compression method
2233 +and the etag associated to the file.
2235 +Cleaning the cache is left to the user. A cron job deleting files older than
2236 +10 days could do it: ::
2238 + find /var/www/cache -type f -mtime +10 | xargs -r rm
2243 +The module limits the compression of files to files smaller than 128 MByte and
2244 +larger than 128 Byte.
2246 +The lower limit is set as small files tend to become larger by compressing due
2247 +to the compression headers, the upper limit is set to work sensibly with
2248 +memory and cpu-time.
2250 +Directories containing a tilde ('~') are not created automatically (See ticket
2251 +#113). To enable compression for user dirs you have to create the directories
2252 +by hand in the cache directory.
2257 +compress.allowed-encodings
2258 + override default set of allowed encodings
2262 + compress.allowed-encodings = ("bzip2", "gzip", "deflate")
2265 name of the directory where compressed content will be cached
2267 @@ -47,20 +82,111 @@
2268 Default: not set, compress the file for every request
2271 - mimetypes where might get compressed
2272 + mimetypes which might get compressed
2276 compress.filetype = ("text/plain", "text/html")
2278 + Keep in mind that compressed JavaScript and CSS files are broken in some
2279 + browsers. Not setting any filetypes will result in no files being compressed.
2281 + NOTE: You have to specify the full mime-type! If you also define a charset, for example, you have to use "text/plain; charset=utf-8" instead of just "text/plain".
2285 +compress.max-filesize
2286 + maximum size of the original file to be compressed kBytes.
2288 + This is meant to protect the server against DoSing as compressing large
2289 + (let's say 1Gbyte) takes a lot of time and would delay the whole operation
2292 + There is a hard upper limit of 128Mbyte.
2294 + Default: unlimited (== hard-limit of 128MByte)
2296 +Display compressed files
2297 +========================
2299 +If you enable mod_compress, and you want to force clients to uncompress and display compressed text files, please force mimetype to nothing.
2301 +If you want to add headers for uncompress and display diff.gz files , add this section in your conf : ::
2303 + $HTTP["url"] =~ "\.diff\.gz" {
2304 + setenv.add-response-header = ( "Content-Encoding" => "gzip" )
2305 + mimetype.assign = ()
2309 Compressing Dynamic Content
2310 ===========================
2315 To compress dynamic content with PHP please enable ::
2317 zlib.output_compression = 1
2318 + zlib.output_handler = On
2320 in the php.ini as PHP provides compression support by itself.
2322 +mod_compress of lighttpd 1.5 r1992 may not set correct Content-Encoding with php-fcgi. A solution to that problem would be:
2324 +1.disable mod_compress when request a php file::
2326 + $HTTP["url"] !~ "\.php$" {
2327 + compress.filetype = ("text/plain", "text/html", "text/javascript", "text/css", "text/xml")
2330 +2.enable mod_setenv of your lighttpd::
2332 + server.modules += ( "mod_setenv" )
2334 +3.manually set Content-Encoding::
2336 + $HTTP["url"] =~ "\.php$" {
2337 + setenv.add-response-header = ( "Content-Encoding" => "gzip")
2344 +To compress dynamic content with TurboGears please enable ::
2347 + gzip_filter.on = True
2348 + gzip_filter.mime_types = ["application/x-javascript", "text/javascript", "text/html", "text/css", "text/plain"]
2350 +in the config/app.cfg file in your TurboGears application. The above lines should already be in the file. You just need to remove the comment symbol in front of the lines to make them active.
2355 +To compress dynamic content with Django please enable the GZipMiddleware ::
2357 + MIDDLEWARE_CLASSES = (
2358 + 'django.middleware.gzip.GZipMiddleware',
2362 +in the settings.py file in your Django project.
2367 +To compress dynamic content with Perl/Catalyst, simply use the Catalyst::Plugin::Compress::Gzip module available on CPAN ::
2374 +in your main package (MyApp.pm). Further configuration is not required.
2380 Index: doc/rewrite.txt
2381 ===================================================================
2382 --- doc/rewrite.txt (.../tags/lighttpd-1.4.20) (revision 2371)
2383 +++ doc/rewrite.txt (.../branches/lighttpd-1.4.x) (revision 2371)
2385 The options ``url.rewrite`` and ``url.rewrite-final`` were mapped to ``url.rewrite-once``
2391 +Do NOT use mod_rewrite to protect specific urls, as the original url passed from the client
2392 +is matched against your rules, for example strings like "/abc/../xyz%2f/path".
2398 ===================================================================
2399 --- SConstruct (.../tags/lighttpd-1.4.20) (revision 2371)
2400 +++ SConstruct (.../branches/lighttpd-1.4.x) (revision 2371)
2404 package = 'lighttpd'
2408 def checkCHeaders(autoconf, hdrs):
2409 p = re.compile('[^A-Z0-9]')
2411 ===================================================================
2412 --- Makefile.am (.../tags/lighttpd-1.4.20) (revision 2371)
2413 +++ Makefile.am (.../branches/lighttpd-1.4.x) (revision 2371)
2415 -SUBDIRS=src doc tests cygwin openwrt
2416 +SUBDIRS=src doc tests
2418 EXTRA_DIST=autogen.sh SConstruct
2421 ===================================================================
2422 --- NEWS (.../tags/lighttpd-1.4.20) (revision 2371)
2423 +++ NEWS (.../branches/lighttpd-1.4.x) (revision 2371)
2431 + * Fix base64 decoding in mod_auth (#1757, thx guido)
2432 + * Fix mod_cgi segfault when bound to unix domain socket (#653)
2433 + * Do not rely on ioctl FIONREAD (#673)
2434 + * Now really fix mod auth ldap (#1066)
2435 + * Fix leaving zombie process with include_shell (#1777)
2436 + * Removed debian/, openwrt/ and cygwin/; they weren't kept up-to-date, and we decided to remove dist. specific stuff
2437 + * Try to convert string options to shorts for numeric options in config file; allows to use env-vars for numeric options. (#1159, thx andrewb)
2438 + * Do not cache default vhost in mod_simple_vhost (#709)
2439 + * Trust pcre-config, do not check for pcre manually (#1769)
2440 + * Fix fastcgi authorization in subdirectories with check-local=disabled; don't split pathinfo for authorizer. (#963)
2441 + * Add possibility to disable methods in mod_compress (#1773)
2442 + * Fix duplicate connection keep-alive/transfer-encoding headers (#960)
2443 + * Fixed fix for round-robin in mod_proxy (forgot to increment the index) (#1715)
2444 + * Fix fastcgi-authorizer handling; Status: 200 is now accepted as the doc requests
2445 + * Compare address family in inet_ntop_cache
2446 + * Revert CVE-2008-4359 (#1720) fix "encoding+simplifying urls for rewrite/redirect": too many regressions.
2447 + * Use FD_CLOEXEC if possible (fixes #1821)
2448 + * Optimized buffer usage in mod_proxy (fixes #1850)
2449 + * Fix uninitialized value in time struct after strptime
2451 +- 1.4.20 - 2008-09-30
2453 * Fix mod_compress to compile with old gcc version (#1592)
2454 * Fix mod_extforward to compile with old gcc version (#1591)
2455 * Update documentation for #1587
2457 * allow digits in [s]cgi env vars (#1712)
2458 * fixed dropping last character of evhost pattern (#161)
2459 * print helpful error message on conditionals in global block (#1550)
2460 - * decode url before matching in mod_rewrite (#1720)
2461 + * decode url before matching in mod_rewrite (#1720) -- (reverted for 1.4.21)
2462 * fixed conditional patching of ldap filter (#1564)
2463 - * Match headers case insensitive in response (removing of X-{Sendfile,LIGHTTPD-*}, catching Date/Server)
2464 - * fixed bug with case-insensitive filenames in mod_userdir (#1589), spotted by "anders1"
2465 + * Match headers case insensitive in response (removing of X-{Sendfile,LIGHTTPD-*}, catching Date/Server) [2281]
2466 + * fixed bug with case-insensitive filenames in mod_userdir (#1589), spotted by "anders1" (CVE-2008-4360)
2467 * fixed format string bugs in mod_accesslog for SYSLOG
2468 * replaced fprintf with log_error_write in fastcgi debug
2469 * fixed mem leak in ssi expression parser (#1753), thx Take5k
2471 * fix splitting of auth-ldap filter
2472 * workaround ldap connection leak if a ldap connection failed (restarting ldap)
2473 * fix auth.backend.ldap.bind-dn/pw problems (only read from global context for temporary ldap reconnects, thx ruskie)
2474 - * fix memleak in request header parsing (#1774, thx qhy)
2475 + * fix memleak in request header parsing (#1774, thx qhy) (CVE-2008-4298)
2476 * fix mod_rewrite memleak/endless loop detection (#1775, thx phy - again!)
2477 - * use decoded url for matching in mod_redirect (#1720)
2478 + * use decoded url for matching in mod_redirect (#1720) (CVE-2008-4359) -- (reverted for 1.4.21)
2480 - 1.4.19 - 2008-03-10
2482 Index: CMakeLists.txt
2483 ===================================================================
2484 --- CMakeLists.txt (.../tags/lighttpd-1.4.20) (revision 0)
2485 +++ CMakeLists.txt (.../branches/lighttpd-1.4.x) (revision 2371)
2487 +PROJECT(lighttpd C)
2489 +CMAKE_MINIMUM_REQUIRED(VERSION 2.4.0 FATAL_ERROR)
2491 +SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
2497 +SET(CPACK_PACKAGE_VERSION_MAJOR 2)
2498 +SET(CPACK_PACKAGE_VERSION_MINOR 0)
2499 +SET(CPACK_PACKAGE_VERSION_PATCH 0)
2501 +SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING")
2502 +SET(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README")
2503 +SET(CPACK_PACKAGE_VENDOR "jan@kneschke.de")
2505 +SET(CPACK_SOURCE_GENERATOR "TGZ")
2506 +SET(CPACK_SOURCE_IGNORE_FILES "/\\\\.;~$;/_;build/;CMakeFiles/;CMakeCache;gz$;Makefile\\\\.;trace;Testing/;foo;autom4te;cmake_install;CPack;\\\\.pem;ltmain.sh;configure;libtool;/config\\\\.;missing;autogen.sh;install-sh;Dart;aclocal;log$;Makefile$")
2508 +SET(CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
2510 +ADD_SUBDIRECTORY(src build)
2511 +#ADD_SUBDIRECTORY(doc)
2512 +ADD_SUBDIRECTORY(tests)
2514 Property changes on: .
2515 ___________________________________________________________________
2516 Modified: bzr:revision-info
2517 - timestamp: 2008-09-23 21:04:22.819999933 +0200
2518 committer: Stefan Bühler <stbuehler@web.de>
2520 branch-nick: lighttpd-1.4.x
2522 + timestamp: 2008-12-18 23:23:05.487999916 +0100
2523 committer: Stefan Bühler <stbuehler@web.de>
2525 branch-nick: lighttpd-1.4.x
2527 Modified: bzr:revision-id:v3-trunk0
2528 - 1127 stbuehler@web.de-20080728081644-j4cxnhduw8kbt8um
2529 1128 stbuehler@web.de-20080728084246-axvxdtjsrratxixs
2530 1129 stbuehler@web.de-20080729211700-s8v6nq2cu06qesls
2531 1130 stbuehler@web.de-20080729211726-4yxb6e5dva1cn0lz
2532 1131 stbuehler@web.de-20080729211750-4ulzigswx17uciyu
2533 1132 stbuehler@web.de-20080729211850-nliz3kd0m576ztuu
2534 1133 stbuehler@web.de-20080730163440-dg2y2sbf0u4grmn4
2535 1134 stbuehler@web.de-20080730173952-kiutzg6geqy7mick
2536 1135 stbuehler@web.de-20080730193616-9kc2ms7rrhv1lkn7
2537 1136 stbuehler@web.de-20080730211457-z4a6uth1y29glbqh
2538 1137 stbuehler@web.de-20080730213517-b6sjcrdwbmipl334
2539 1138 stbuehler@web.de-20080731102617-2xw8unjfqic7lsew
2540 1139 stbuehler@web.de-20080731102703-q4tu5a6em9y8xdg0
2541 1140 stbuehler@web.de-20080731102729-l6vn5b05w9swqbg5
2542 1141 stbuehler@web.de-20080731102756-oj3d4tnk0l90mj77
2543 1142 stbuehler@web.de-20080731204442-blw14cj2fkr3l8ly
2544 1143 stbuehler@web.de-20080731204508-imtfnurf922mg7tj
2545 1144 stbuehler@web.de-20080801112347-girnwswdkwm8wuip
2546 1145 stbuehler@web.de-20080801161245-kx1temr529o7xko9
2547 1146 stbuehler@web.de-20080801175332-oc9e7x8edn1owcc0
2548 1147 stbuehler@web.de-20080801183454-5i66v0gsdv0cgmia
2549 1148 stbuehler@web.de-20080801192849-6zklfbb832sx0hvr
2550 1149 stbuehler@web.de-20080801203119-o16elp8w854s6lol
2551 1150 stbuehler@web.de-20080802162146-a4v57svc788pwdsv
2552 1151 stbuehler@web.de-20080802162202-9udlc1wuwt09pyh2
2553 1152 stbuehler@web.de-20080804135803-yuor9ze06px7qta4
2554 1153 stbuehler@web.de-20080812194728-fupt781o6q058unh
2555 1154 stbuehler@web.de-20080818162116-piz0ukqsaecv2li2
2556 1155 stbuehler@web.de-20080818235700-94t0xc6ml70zojwq
2557 1156 stbuehler@web.de-20080819163650-1qhwsqszr78cr4xx
2558 1157 stbuehler@web.de-20080819163757-1qq3t1f1wj69t8xs
2559 1158 stbuehler@web.de-20080819163914-rklhkurg8apv85l2
2560 1159 stbuehler@web.de-20080819163953-tlqew751e43phf5b
2561 1160 stbuehler@web.de-20080819164108-8ogh68sm1uyteawe
2562 1161 stbuehler@web.de-20080819173911-w5bqpb7cp9jmdqye
2563 1162 stbuehler@web.de-20080819222242-c0ta5gnli9p3j35a
2564 1163 stbuehler@web.de-20080820100730-g1bwdh4nqb53ag9u
2565 1164 stbuehler@web.de-20080820100752-9pggugdyfnnps8qu
2566 1165 stbuehler@web.de-20080820164258-v2j00motsrsc5esp
2567 1166 stbuehler@web.de-20080827144628-hi9hf4ch3n1wf9ao
2568 1167 stbuehler@web.de-20080827144903-tfxu4yehlyu5kegc
2569 1168 stbuehler@web.de-20080827155155-7mt92orehbxkh2lh
2570 1169 stbuehler@web.de-20080917142048-zbcwpk39q9ewd516
2571 1170 stbuehler@web.de-20080917142300-16gzt21x4nbjtj87
2572 1171 stbuehler@web.de-20080919160134-385anjnd3txxdw3x
2573 1172 stbuehler@web.de-20080920134142-fvvwaw2ys51dg4rj
2574 1173 stbuehler@web.de-20080921153311-1f7rn01atdilmxmy
2575 1174 stbuehler@web.de-20080922101346-wel327kjmykkpvmp
2576 1175 stbuehler@web.de-20080923190422-uow06l38ndue36o4
2578 + 1127 stbuehler@web.de-20080728081644-j4cxnhduw8kbt8um
2579 1128 stbuehler@web.de-20080728084246-axvxdtjsrratxixs
2580 1129 stbuehler@web.de-20080729211700-s8v6nq2cu06qesls
2581 1130 stbuehler@web.de-20080729211726-4yxb6e5dva1cn0lz
2582 1131 stbuehler@web.de-20080729211750-4ulzigswx17uciyu
2583 1132 stbuehler@web.de-20080729211850-nliz3kd0m576ztuu
2584 1133 stbuehler@web.de-20080730163440-dg2y2sbf0u4grmn4
2585 1134 stbuehler@web.de-20080730173952-kiutzg6geqy7mick
2586 1135 stbuehler@web.de-20080730193616-9kc2ms7rrhv1lkn7
2587 1136 stbuehler@web.de-20080730211457-z4a6uth1y29glbqh
2588 1137 stbuehler@web.de-20080730213517-b6sjcrdwbmipl334
2589 1138 stbuehler@web.de-20080731102617-2xw8unjfqic7lsew
2590 1139 stbuehler@web.de-20080731102703-q4tu5a6em9y8xdg0
2591 1140 stbuehler@web.de-20080731102729-l6vn5b05w9swqbg5
2592 1141 stbuehler@web.de-20080731102756-oj3d4tnk0l90mj77
2593 1142 stbuehler@web.de-20080731204442-blw14cj2fkr3l8ly
2594 1143 stbuehler@web.de-20080731204508-imtfnurf922mg7tj
2595 1144 stbuehler@web.de-20080801112347-girnwswdkwm8wuip
2596 1145 stbuehler@web.de-20080801161245-kx1temr529o7xko9
2597 1146 stbuehler@web.de-20080801175332-oc9e7x8edn1owcc0
2598 1147 stbuehler@web.de-20080801183454-5i66v0gsdv0cgmia
2599 1148 stbuehler@web.de-20080801192849-6zklfbb832sx0hvr
2600 1149 stbuehler@web.de-20080801203119-o16elp8w854s6lol
2601 1150 stbuehler@web.de-20080802162146-a4v57svc788pwdsv
2602 1151 stbuehler@web.de-20080802162202-9udlc1wuwt09pyh2
2603 1152 stbuehler@web.de-20080804135803-yuor9ze06px7qta4
2604 1153 stbuehler@web.de-20080812194728-fupt781o6q058unh
2605 1154 stbuehler@web.de-20080818162116-piz0ukqsaecv2li2
2606 1155 stbuehler@web.de-20080818235700-94t0xc6ml70zojwq
2607 1156 stbuehler@web.de-20080819163650-1qhwsqszr78cr4xx
2608 1157 stbuehler@web.de-20080819163757-1qq3t1f1wj69t8xs
2609 1158 stbuehler@web.de-20080819163914-rklhkurg8apv85l2
2610 1159 stbuehler@web.de-20080819163953-tlqew751e43phf5b
2611 1160 stbuehler@web.de-20080819164108-8ogh68sm1uyteawe
2612 1161 stbuehler@web.de-20080819173911-w5bqpb7cp9jmdqye
2613 1162 stbuehler@web.de-20080819222242-c0ta5gnli9p3j35a
2614 1163 stbuehler@web.de-20080820100730-g1bwdh4nqb53ag9u
2615 1164 stbuehler@web.de-20080820100752-9pggugdyfnnps8qu
2616 1165 stbuehler@web.de-20080820164258-v2j00motsrsc5esp
2617 1166 stbuehler@web.de-20080827144628-hi9hf4ch3n1wf9ao
2618 1167 stbuehler@web.de-20080827144903-tfxu4yehlyu5kegc
2619 1168 stbuehler@web.de-20080827155155-7mt92orehbxkh2lh
2620 1169 stbuehler@web.de-20080917142048-zbcwpk39q9ewd516
2621 1170 stbuehler@web.de-20080917142300-16gzt21x4nbjtj87
2622 1171 stbuehler@web.de-20080919160134-385anjnd3txxdw3x
2623 1172 stbuehler@web.de-20080920134142-fvvwaw2ys51dg4rj
2624 1173 stbuehler@web.de-20080921153311-1f7rn01atdilmxmy
2625 1174 stbuehler@web.de-20080922101346-wel327kjmykkpvmp
2626 1175 stbuehler@web.de-20080923190422-uow06l38ndue36o4
2627 1176 stbuehler@web.de-20080930112012-53jby2m8xslmd1hm
2628 1177 stbuehler@web.de-20080930134824-j9q72rwuiczzof5k
2629 1178 stbuehler@web.de-20080930142037-32pb6m3zjcwryw1w
2630 1179 stbuehler@web.de-20080930142756-ueovgoshyb996bce
2631 1180 stbuehler@web.de-20080930152935-1zfy67brol3xdbc0
2632 1181 stbuehler@web.de-20080930193919-13n2q4c6fbgw0dkx
2633 1182 stbuehler@web.de-20080930211152-4hmgs95wyg2deol7
2634 1183 stbuehler@web.de-20081001132402-hxnyu6yzyk3mjf4d
2635 1184 stbuehler@web.de-20081001155102-qf0mmu2kkpgr7xf0
2636 1185 stbuehler@web.de-20081001160009-n67ss0vzlac2y60k
2637 1186 stbuehler@web.de-20081001200802-l5og517etnneitk0
2638 1188 stbuehler@web.de-20081004160711-ygaohrecmutiqlla
2639 1189 stbuehler@web.de-20081004211932-vq16u26mthbeed7d
2640 1191 stbuehler@web.de-20081005224446-1bztt6zqrjh8w8fd
2641 1192 stbuehler@web.de-20081012114652-ihgz590f0gl5gxpw
2642 1193 stbuehler@web.de-20081012114716-jnzljhexi4z2gh92
2643 1195 stbuehler@web.de-20081016120614-kz39vxtz1pebho0o
2644 1196 stbuehler@web.de-20081016121103-trug4hts0o62d1ut
2645 1197 stbuehler@web.de-20081016121114-65quosenmso8frf8
2646 1198 stbuehler@web.de-20081016121421-xjjb7fb53pxu6odj
2647 1199 stbuehler@web.de-20081205222033-6qok7y19pwp3kxm9
2648 1200 stbuehler@web.de-20081205222811-49izmzxui0y9ncq6
2649 1201 stbuehler@web.de-20081205233903-708beaujtf26gprx
2650 1202 stbuehler@web.de-20081207151631-yv9bdf94zw83jxpv
2651 1203 stbuehler@web.de-20081207151822-mhyg0gkedmttdqvd
2652 1204 stbuehler@web.de-20081207151835-1m3yta2fjc4pgb8y
2653 1205 stbuehler@web.de-20081218221139-w8los43bjbhy9urh
2654 1206 stbuehler@web.de-20081218222305-5wz7000a62iqa81r