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 2392)
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 2392)
54 +++ src/configfile-glue.c (.../branches/lighttpd-1.4.x) (revision 2392)
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);
88 + case COMP_HTTP_LANGUAGE: {
90 + if (NULL != (ds = (data_string *)array_get_element(con->request.headers, "Accept-Language"))) {
93 + l = srv->empty_string;
98 return COND_RESULT_FALSE;
101 ===================================================================
102 --- src/mod_cgi.c (.../tags/lighttpd-1.4.20) (revision 2392)
103 +++ src/mod_cgi.c (.../branches/lighttpd-1.4.x) (revision 2392)
104 @@ -822,15 +822,27 @@
106 cgi_env_add(&env, CONST_STR_LEN("SERVER_PORT"), buf, strlen(buf));
108 + switch (srv_sock->addr.plain.sa_family) {
110 - s = inet_ntop(srv_sock->addr.plain.sa_family,
111 - srv_sock->addr.plain.sa_family == AF_INET6 ?
112 - (const void *) &(srv_sock->addr.ipv6.sin6_addr) :
113 - (const void *) &(srv_sock->addr.ipv4.sin_addr),
116 + s = inet_ntop(srv_sock->addr.plain.sa_family,
117 + (const void *) &(srv_sock->addr.ipv6.sin6_addr),
121 + s = inet_ntop(srv_sock->addr.plain.sa_family,
122 + (const void *) &(srv_sock->addr.ipv4.sin_addr),
126 - s = inet_ntoa(srv_sock->addr.ipv4.sin_addr);
128 + s = inet_ntoa(srv_sock->addr.ipv4.sin_addr);
135 cgi_env_add(&env, CONST_STR_LEN("SERVER_ADDR"), s, strlen(s));
137 s = get_http_method_name(con->request.http_method);
138 @@ -848,15 +860,27 @@
142 + switch (con->dst_addr.plain.sa_family) {
144 - s = inet_ntop(con->dst_addr.plain.sa_family,
145 - con->dst_addr.plain.sa_family == AF_INET6 ?
146 - (const void *) &(con->dst_addr.ipv6.sin6_addr) :
147 - (const void *) &(con->dst_addr.ipv4.sin_addr),
150 + s = inet_ntop(con->dst_addr.plain.sa_family,
151 + (const void *) &(con->dst_addr.ipv6.sin6_addr),
155 + s = inet_ntop(con->dst_addr.plain.sa_family,
156 + (const void *) &(con->dst_addr.ipv4.sin_addr),
160 - s = inet_ntoa(con->dst_addr.ipv4.sin_addr);
162 + s = inet_ntoa(con->dst_addr.ipv4.sin_addr);
169 cgi_env_add(&env, CONST_STR_LEN("REMOTE_ADDR"), s, strlen(s));
173 ===================================================================
174 --- src/base.h (.../tags/lighttpd-1.4.20) (revision 2392)
175 +++ src/base.h (.../branches/lighttpd-1.4.x) (revision 2392)
177 unsigned short log_response_header;
178 unsigned short log_condition_handling;
179 unsigned short log_ssl_noise;
180 + unsigned short log_timeouts;
187 unsigned short enable_cores;
188 + unsigned short reject_expect_100_with_417;
192 Index: src/mod_rewrite.c
193 ===================================================================
194 --- src/mod_rewrite.c (.../tags/lighttpd-1.4.20) (revision 2392)
195 +++ src/mod_rewrite.c (.../branches/lighttpd-1.4.x) (revision 2392)
198 if (!p->conf.rewrite) return HANDLER_GO_ON;
200 - buffer_copy_string_buffer(p->match_buf, con->uri.path);
201 - if (con->uri.query->used > 0) {
202 - buffer_append_string_len(p->match_buf, CONST_STR_LEN("?"));
203 - buffer_append_string_buffer(p->match_buf, con->uri.query);
205 + buffer_copy_string_buffer(p->match_buf, con->request.uri);
207 for (i = 0; i < p->conf.rewrite->used; i++) {
209 Index: src/connections.c
210 ===================================================================
211 --- src/connections.c (.../tags/lighttpd-1.4.20) (revision 2392)
212 +++ src/connections.c (.../branches/lighttpd-1.4.x) (revision 2392)
213 @@ -330,15 +330,13 @@
214 buffer_prepare_copy(b, 4 * 1024);
215 len = recv(con->fd, b->ptr, b->size - 1, 0);
217 - if (ioctl(con->fd, FIONREAD, &toread)) {
218 - log_error_write(srv, __FILE__, __LINE__, "sd",
219 - "unexpected end-of-file:",
222 + if (ioctl(con->fd, FIONREAD, &toread) || toread == 0) {
223 + b = chunkqueue_get_append_buffer(con->read_queue);
224 + buffer_prepare_copy(b, 4 * 1024);
226 + b = chunkqueue_get_append_buffer(con->read_queue);
227 + buffer_prepare_copy(b, toread + 1);
229 - b = chunkqueue_get_append_buffer(con->read_queue);
230 - buffer_prepare_copy(b, toread + 1);
232 len = read(con->fd, b->ptr, b->size - 1);
235 @@ -1066,6 +1064,9 @@
236 if (dst_c->file.fd == -1) {
237 /* this should not happen as we cache the fd, but you never know */
238 dst_c->file.fd = open(dst_c->file.name->ptr, O_WRONLY | O_APPEND);
240 + fcntl(dst_c->file.fd, F_SETFD, FD_CLOEXEC);
244 /* the chunk is too large now, close it */
246 ===================================================================
247 --- src/array.h (.../tags/lighttpd-1.4.20) (revision 2392)
248 +++ src/array.h (.../branches/lighttpd-1.4.x) (revision 2392)
252 COMP_HTTP_USER_AGENT,
253 + COMP_HTTP_LANGUAGE,
256 COMP_HTTP_QUERY_STRING,
257 Index: src/mod_alias.c
258 ===================================================================
259 --- src/mod_alias.c (.../tags/lighttpd-1.4.20) (revision 2392)
260 +++ src/mod_alias.c (.../branches/lighttpd-1.4.x) (revision 2392)
263 /* ok, they have same prefix. check position */
264 if (a->sorted[j] < a->sorted[k]) {
265 - fprintf(stderr, "url.alias: `%s' will never match as `%s' matched first\n",
268 + log_error_write(srv, __FILE__, __LINE__, "SBSBS",
269 + "url.alias: `", key, "' will never match as `", prefix, "' matched first");
270 return HANDLER_ERROR;
273 Index: src/configfile.c
274 ===================================================================
275 --- src/configfile.c (.../tags/lighttpd-1.4.20) (revision 2392)
276 +++ src/configfile.c (.../branches/lighttpd-1.4.x) (revision 2392)
278 { "server.core-files", NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_CONNECTION }, /* 46 */
279 { "ssl.cipher-list", NULL, T_CONFIG_STRING, T_CONFIG_SCOPE_SERVER }, /* 47 */
280 { "ssl.use-sslv2", NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_CONNECTION }, /* 48 */
281 - { "etag.use-inode", NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_SERVER }, /* 49 */
282 - { "etag.use-mtime", NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_SERVER }, /* 50 */
283 - { "etag.use-size", NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_SERVER }, /* 51 */
284 + { "etag.use-inode", NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_SERVER }, /* 49 */
285 + { "etag.use-mtime", NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_SERVER }, /* 50 */
286 + { "etag.use-size", NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_SERVER }, /* 51 */
287 + { "server.reject-expect-100-with-417", NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_SERVER }, /* 52 */
288 + { "debug.log-timeouts", NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_CONNECTION }, /* 53 */
289 { "server.host", "use server.bind instead", T_CONFIG_DEPRECATED, T_CONFIG_SCOPE_UNSET },
290 { "server.docroot", "use server.document-root instead", T_CONFIG_DEPRECATED, T_CONFIG_SCOPE_UNSET },
291 { "server.virtual-root", "load mod_simple_vhost and use simple-vhost.server-root instead", T_CONFIG_DEPRECATED, T_CONFIG_SCOPE_UNSET },
294 cv[43].destination = &(srv->srvconf.max_conns);
295 cv[12].destination = &(srv->srvconf.max_request_size);
296 + cv[52].destination = &(srv->srvconf.reject_expect_100_with_417);
297 srv->config_storage = calloc(1, srv->config_context->used * sizeof(specific_config *));
299 assert(srv->config_storage);
301 s->max_write_idle = 360;
304 - s->ssl_use_sslv2 = 1;
305 + s->ssl_use_sslv2 = 0;
308 s->follow_symlink = 1;
310 cv[33].destination = &(s->log_response_header);
311 cv[34].destination = &(s->log_request_header);
312 cv[35].destination = &(s->log_ssl_noise);
313 + cv[53].destination = &(s->log_timeouts);
315 cv[36].destination = &(s->allow_http11);
316 cv[39].destination = s->ssl_ca_file;
318 PATCH(log_file_not_found);
319 } else if (buffer_is_equal_string(du->key, CONST_STR_LEN("debug.log-ssl-noise"))) {
320 PATCH(log_ssl_noise);
321 + } else if (buffer_is_equal_string(du->key, CONST_STR_LEN("debug.log-timeouts"))) {
322 + PATCH(log_timeouts);
323 } else if (buffer_is_equal_string(du->key, CONST_STR_LEN("server.protocol-http11"))) {
325 } else if (buffer_is_equal_string(du->key, CONST_STR_LEN("server.force-lowercase-filenames"))) {
329 int config_parse_cmd(server *srv, config_t *context, const char *cmd) {
330 - proc_handler_t proc;
335 chdir(context->basedir->ptr);
338 - if (0 != proc_open_buffer(&proc, cmd, NULL, out, NULL)) {
339 + if (0 != proc_open_buffer(cmd, NULL, out, NULL)) {
340 log_error_write(srv, __FILE__, __LINE__, "sbss",
341 "opening", source, "failed:", strerror(errno));
343 Index: src/mod_trigger_b4_dl.c
344 ===================================================================
345 --- src/mod_trigger_b4_dl.c (.../tags/lighttpd-1.4.20) (revision 2392)
346 +++ src/mod_trigger_b4_dl.c (.../branches/lighttpd-1.4.x) (revision 2392)
356 return HANDLER_ERROR;
359 + fcntl(gdbm_fdesc(s->db), F_SETFD, FD_CLOEXEC);
363 #if defined(HAVE_PCRE_H)
364 Index: src/mod_mysql_vhost.c
365 ===================================================================
366 --- src/mod_mysql_vhost.c (.../tags/lighttpd-1.4.20) (revision 2392)
367 +++ src/mod_mysql_vhost.c (.../branches/lighttpd-1.4.x) (revision 2392)
369 if (!(buffer_is_empty(s->myuser) ||
370 buffer_is_empty(s->mydb))) {
371 my_bool reconnect = 1;
374 if (NULL == (s->mysql = mysql_init(NULL))) {
375 log_error_write(srv, __FILE__, __LINE__, "s", "mysql_init() failed, exiting...");
376 @@ -267,19 +266,27 @@
377 return HANDLER_ERROR;
382 /* set close_on_exec for mysql the hard way */
383 /* Note: this only works as it is done during startup, */
384 /* otherwise we cannot be sure that mysql is fd i-1 */
385 - if (-1 == (fd = open("/dev/null", 0))) {
387 + if (-1 != (fd = open("/dev/null", 0))) {
390 fcntl(fd-1, F_SETFD, FD_CLOEXEC);
396 + fcntl(s->mysql->net.fd, F_SETFD, FD_CLOEXEC);
404 - return HANDLER_GO_ON;
405 + return HANDLER_GO_ON;
410 ===================================================================
411 --- src/request.c (.../tags/lighttpd-1.4.20) (revision 2392)
412 +++ src/request.c (.../branches/lighttpd-1.4.x) (revision 2392)
413 @@ -894,11 +894,12 @@
417 - con->http_status = 417;
418 - con->keep_alive = 0;
420 - array_insert_unique(con->request.headers, (data_unset *)ds);
422 + if (srv->srvconf.reject_expect_100_with_417 && 0 == buffer_caseless_compare(CONST_BUF_LEN(ds->value), CONST_STR_LEN("100-continue"))) {
423 + con->http_status = 417;
424 + con->keep_alive = 0;
425 + array_insert_unique(con->request.headers, (data_unset *)ds);
428 } else if (cmp > 0 && 0 == (cmp = buffer_caseless_compare(CONST_BUF_LEN(ds->key), CONST_STR_LEN("Host")))) {
429 if (!con->request.http_host) {
430 con->request.http_host = ds->value;
431 @@ -1020,7 +1021,7 @@
432 /* strip leading WS */
433 if (value == cur) value = cur+1;
435 - if (*cur >= 0 && *cur < 32) {
436 + if (*cur >= 0 && *cur < 32 && *cur != '\t') {
437 if (srv->srvconf.log_request_header_on_error) {
438 log_error_write(srv, __FILE__, __LINE__, "sds",
439 "invalid char in header", (int)*cur, "-> 400");
440 Index: src/inet_ntop_cache.c
441 ===================================================================
442 --- src/inet_ntop_cache.c (.../tags/lighttpd-1.4.20) (revision 2392)
443 +++ src/inet_ntop_cache.c (.../branches/lighttpd-1.4.x) (revision 2392)
447 for (i = 0; i < INET_NTOP_CACHE_MAX; i++) {
448 - if (srv->inet_ntop_cache[i].ts != 0) {
449 + if (srv->inet_ntop_cache[i].ts != 0 && srv->inet_ntop_cache[i].family == addr->plain.sa_family) {
450 if (srv->inet_ntop_cache[i].family == AF_INET6 &&
451 0 == memcmp(srv->inet_ntop_cache[i].addr.ipv6.s6_addr, addr->ipv6.sin6_addr.s6_addr, 16)) {
452 /* IPv6 found in cache */
453 Index: src/mod_rrdtool.c
454 ===================================================================
455 --- src/mod_rrdtool.c (.../tags/lighttpd-1.4.20) (revision 2392)
456 +++ src/mod_rrdtool.c (.../branches/lighttpd-1.4.x) (revision 2392)
458 p->read_fd = from_rrdtool_fds[0];
459 p->rrdtool_pid = pid;
462 + fcntl(p->write_fd, F_SETFD, FD_CLOEXEC);
463 + fcntl(p->read_fd, F_SETFD, FD_CLOEXEC);
469 Index: src/response.c
470 ===================================================================
471 --- src/response.c (.../tags/lighttpd-1.4.20) (revision 2392)
472 +++ src/response.c (.../branches/lighttpd-1.4.x) (revision 2392)
474 buffer_append_string(b, get_http_status_name(con->http_status));
476 if (con->request.http_version != HTTP_VERSION_1_1 || con->keep_alive == 0) {
477 - buffer_append_string_len(b, CONST_STR_LEN("\r\nConnection: "));
478 if (con->keep_alive) {
479 - buffer_append_string_len(b, CONST_STR_LEN("keep-alive"));
480 + response_header_overwrite(srv, con, CONST_STR_LEN("Connection"), CONST_STR_LEN("keep-alive"));
482 - buffer_append_string_len(b, CONST_STR_LEN("close"));
483 + response_header_overwrite(srv, con, CONST_STR_LEN("Connection"), CONST_STR_LEN("close"));
487 if (con->response.transfer_encoding & HTTP_TRANSFER_ENCODING_CHUNKED) {
488 - buffer_append_string_len(b, CONST_STR_LEN("\r\nTransfer-Encoding: chunked"));
489 + response_header_overwrite(srv, con, CONST_STR_LEN("Transfer-Encoding"), CONST_STR_LEN("chunked"));
494 config_patch_connection(srv, con, COMP_HTTP_REMOTE_IP); /* Client-IP */
495 config_patch_connection(srv, con, COMP_HTTP_REFERER); /* Referer: */
496 config_patch_connection(srv, con, COMP_HTTP_USER_AGENT);/* User-Agent: */
497 + config_patch_connection(srv, con, COMP_HTTP_LANGUAGE); /* Accept-Language: */
498 config_patch_connection(srv, con, COMP_HTTP_COOKIE); /* Cookie: */
499 config_patch_connection(srv, con, COMP_HTTP_REQUEST_METHOD); /* REQUEST_METHOD */
509 + * - based on the raw URL
513 + switch(r = plugins_call_handle_uri_raw(srv, con)) {
514 + case HANDLER_GO_ON:
516 + case HANDLER_FINISHED:
517 + case HANDLER_COMEBACK:
518 + case HANDLER_WAIT_FOR_EVENT:
519 + case HANDLER_ERROR:
522 + log_error_write(srv, __FILE__, __LINE__, "sd", "handle_uri_raw: unknown return value", r);
528 * - decode url-encodings (e.g. %20 -> ' ')
534 if (con->request.http_method == HTTP_METHOD_OPTIONS &&
535 con->uri.path_raw->ptr[0] == '*' && con->uri.path_raw->ptr[1] == '\0') {
537 @@ -255,32 +277,10 @@
538 log_error_write(srv, __FILE__, __LINE__, "sb", "URI-path : ", con->uri.path);
546 - * - based on the raw URL
550 - switch(r = plugins_call_handle_uri_raw(srv, con)) {
551 - case HANDLER_GO_ON:
553 - case HANDLER_FINISHED:
554 - case HANDLER_COMEBACK:
555 - case HANDLER_WAIT_FOR_EVENT:
556 - case HANDLER_ERROR:
559 - log_error_write(srv, __FILE__, __LINE__, "sd", "handle_uri_raw: unknown return value", r);
567 * - based on the clean URL
571 ===================================================================
572 --- src/buffer.c (.../tags/lighttpd-1.4.20) (revision 2392)
573 +++ src/buffer.c (.../branches/lighttpd-1.4.x) (revision 2392)
577 if (src->used == 0) {
582 return buffer_copy_string_len(b, src->ptr, src->used - 1);
584 if (!s || !b) return -1;
587 + if (s_len > maxlen) s_len = maxlen;
588 buffer_prepare_append(b, maxlen + 1);
591 Index: src/mod_simple_vhost.c
592 ===================================================================
593 --- src/mod_simple_vhost.c (.../tags/lighttpd-1.4.20) (revision 2392)
594 +++ src/mod_simple_vhost.c (.../branches/lighttpd-1.4.x) (revision 2392)
596 return HANDLER_GO_ON;
598 buffer_copy_string_buffer(con->server_name, p->conf.default_host);
599 + /* do not cache default host */
600 + return HANDLER_GO_ON;
603 buffer_copy_string_buffer(con->server_name, con->uri.authority);
604 Index: src/mod_proxy.c
605 ===================================================================
606 --- src/mod_proxy.c (.../tags/lighttpd-1.4.20) (revision 2392)
607 +++ src/mod_proxy.c (.../branches/lighttpd-1.4.x) (revision 2392)
610 if (ds->value->used && ds->key->used) {
611 if (buffer_is_equal_string(ds->key, CONST_STR_LEN("Connection"))) continue;
612 + if (buffer_is_equal_string(ds->key, CONST_STR_LEN("Proxy-Connection"))) continue;
614 buffer_append_string_buffer(b, ds->key);
615 buffer_append_string_len(b, CONST_STR_LEN(": "));
617 buffer_prepare_append(hctx->response, b + 1);
618 hctx->response->used = 1;
620 - buffer_prepare_append(hctx->response, hctx->response->used + b);
621 + buffer_prepare_append(hctx->response, b);
624 if (-1 == (r = read(hctx->fd, hctx->response->ptr + hctx->response->used - 1, b))) {
625 @@ -1198,7 +1199,8 @@
626 host = (data_proxy *)extension->value->data[0];
628 /* Use last_used_ndx from first host in list */
629 - k = ndx = host->last_used_ndx;
630 + k = host->last_used_ndx;
631 + ndx = k + 1; /* use next host after the last one */
632 if (ndx < 0) ndx = 0;
634 /* Search first active host after last_used_ndx */
635 Index: src/config.h.cmake
636 ===================================================================
637 --- src/config.h.cmake (.../tags/lighttpd-1.4.20) (revision 0)
638 +++ src/config.h.cmake (.../branches/lighttpd-1.4.x) (revision 2392)
641 + CMake autogenerated config.h file. Do not edit!
644 +/* Package details */
645 +#define LIGHTTPD_VERSION_ID ${LIGHTTPD_VERSION_ID}
646 +#define PACKAGE_NAME "${PACKAGE_NAME}"
647 +#define PACKAGE_VERSION "${PACKAGE_VERSION}"
648 +#define PACKAGE_BUILD_DATE "${PACKAGE_BUILD_DATE}"
649 +#define LIBRARY_DIR "${LIGHTTPD_LIBRARY_DIR}"
652 +#cmakedefine HAVE_SYS_DEVPOLL_H
653 +#cmakedefine HAVE_SYS_EPOLL_H
654 +#cmakedefine HAVE_SYS_EVENT_H
655 +#cmakedefine HAVE_SYS_MMAN_H
656 +#cmakedefine HAVE_SYS_POLL_H
657 +#cmakedefine HAVE_SYS_PORT_H
658 +#cmakedefine HAVE_SYS_PRCTL_H
659 +#cmakedefine HAVE_SYS_RESOURCE_H
660 +#cmakedefine HAVE_SYS_SENDFILE_H
661 +#cmakedefine HAVE_SYS_SELECT_H
662 +#cmakedefine HAVE_SYS_SYSLIMITS_H
663 +#cmakedefine HAVE_SYS_TYPES_H
664 +#cmakedefine HAVE_SYS_UIO_H
665 +#cmakedefine HAVE_SYS_UN_H
666 +#cmakedefine HAVE_SYS_WAIT_H
667 +#cmakedefine HAVE_SYS_TIME_H
668 +#cmakedefine HAVE_UNISTD_H
669 +#cmakedefine HAVE_PTHREAD_H
670 +#cmakedefine HAVE_INET_ATON
671 +#cmakedefine HAVE_IPV6
674 +#cmakedefine HAVE_ATTR_ATTRIBUTES_H
675 +#cmakedefine HAVE_XATTR
678 +#cmakedefine HAVE_MYSQL_H
679 +#cmakedefine HAVE_MYSQL
682 +#cmakedefine HAVE_OPENSSL_SSL_H
683 +#cmakedefine HAVE_LIBCRYPTO
684 +#cmakedefine OPENSSL_NO_KRB5
685 +#cmakedefine HAVE_LIBSSL
688 +#cmakedefine HAVE_BZLIB_H
689 +#cmakedefine HAVE_LIBBZ2
692 +#cmakedefine HAVE_FAM_H
693 +#cmakedefine HAVE_FAMNOEXISTS
696 +#cmakedefine HAVE_GETOPT_H
698 +#cmakedefine HAVE_INTTYPES_H
701 +#cmakedefine HAVE_LDAP_H
702 +#cmakedefine HAVE_LIBLDAP
703 +#cmakedefine HAVE_LBER_H
704 +#cmakedefine HAVE_LIBLBER
705 +#cmakedefine LDAP_DEPRECATED 1
708 +#cmakedefine HAVE_LIBXML_H
709 +#cmakedefine HAVE_LIBXML
712 +#cmakedefine HAVE_PCRE_H
713 +#cmakedefine HAVE_LIBPCRE
715 +#cmakedefine HAVE_POLL_H
716 +#cmakedefine HAVE_PWD_H
719 +#cmakedefine HAVE_SQLITE3_H
720 +#cmakedefine HAVE_LIBPCRE
722 +#cmakedefine HAVE_STDDEF_H
723 +#cmakedefine HAVE_STDINT_H
724 +#cmakedefine HAVE_SYSLOG_H
727 +#cmakedefine HAVE_UUID_UUID_H
728 +#cmakedefine HAVE_LIBUUID
731 +#cmakedefine HAVE_ZLIB_H
732 +#cmakedefine HAVE_LIBZ
735 +#cmakedefine HAVE_LUA_H
736 +#cmakedefine HAVE_LIBLUA
739 +#cmakedefine HAVE_GDBM_H
740 +#cmakedefine HAVE_GDBM
743 +#cmakedefine HAVE_MEMCACHE_H
746 +#cmakedefine HAVE_INOTIFY_INIT
747 +#cmakedefine HAVE_SYS_INOTIFY_H
750 +#cmakedefine HAVE_SOCKLEN_T
751 +#cmakedefine SIZEOF_LONG ${SIZEOF_LONG}
752 +#cmakedefine SIZEOF_OFF_T ${SIZEOF_OFF_T}
755 +#cmakedefine HAVE_CHROOT
756 +#cmakedefine HAVE_CRYPT
757 +#cmakedefine HAVE_EPOLL_CTL
758 +#cmakedefine HAVE_FORK
759 +#cmakedefine HAVE_GETRLIMIT
760 +#cmakedefine HAVE_GETUID
761 +#cmakedefine HAVE_GMTIME_R
762 +#cmakedefine HAVE_INET_NTOP
763 +#cmakedefine HAVE_KQUEUE
764 +#cmakedefine HAVE_LOCALTIME_R
765 +#cmakedefine HAVE_LSTAT
766 +#cmakedefine HAVE_MADVISE
767 +#cmakedefine HAVE_MEMCPY
768 +#cmakedefine HAVE_MEMSET
769 +#cmakedefine HAVE_MMAP
770 +#cmakedefine HAVE_PATHCONF
771 +#cmakedefine HAVE_POLL
772 +#cmakedefine HAVE_PORT_CREATE
773 +#cmakedefine HAVE_PRCTL
774 +#cmakedefine HAVE_PREAD
775 +#cmakedefine HAVE_POSIX_FADVISE
776 +#cmakedefine HAVE_SELECT
777 +#cmakedefine HAVE_SENDFILE
778 +#cmakedefine HAVE_SEND_FILE
779 +#cmakedefine HAVE_SENDFILE64
780 +#cmakedefine HAVE_SENDFILEV
781 +#cmakedefine HAVE_SIGACTION
782 +#cmakedefine HAVE_SIGNAL
783 +#cmakedefine HAVE_SIGTIMEDWAIT
784 +#cmakedefine HAVE_STRPTIME
785 +#cmakedefine HAVE_SYSLOG
786 +#cmakedefine HAVE_WRITEV
789 +#cmakedefine HAVE_CRYPT_H
790 +#cmakedefine HAVE_LIBCRYPT
793 +#cmakedefine HAVE_FASTCGI_H
794 +#cmakedefine HAVE_FASTCGI_FASTCGI_H
796 +#cmakedefine LIGHTTPD_STATIC
797 Index: src/network_freebsd_sendfile.c
798 ===================================================================
799 --- src/network_freebsd_sendfile.c (.../tags/lighttpd-1.4.20) (revision 2392)
800 +++ src/network_freebsd_sendfile.c (.../branches/lighttpd-1.4.x) (revision 2392)
805 + r = 0; /* try again later */
810 log_error_write(srv, __FILE__, __LINE__, "ssd", "sendfile: ", strerror(errno), errno);
815 - if (r == 0 && (errno != EAGAIN && errno != EINTR)) {
816 - int oerrno = errno;
817 + } else if (r == 0) {
818 /* We got an event to write but we wrote nothing
820 * - the file shrinked -> error
823 if (offset >= sce->st.st_size) {
824 /* file shrinked, close the connection */
834 Index: src/http_auth.c
835 ===================================================================
836 --- src/http_auth.c (.../tags/lighttpd-1.4.20) (revision 2392)
837 +++ src/http_auth.c (.../branches/lighttpd-1.4.x) (revision 2392)
840 static const char base64_pad = '=';
842 +/* "A-Z a-z 0-9 + /" maps to 0-63 */
843 static const short base64_reverse_table[256] = {
844 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
845 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
846 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63,
847 - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1,
848 - -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
849 - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1,
850 - -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
851 - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1,
852 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
853 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
854 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
855 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
856 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
857 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
858 - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
859 +/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
860 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x00 - 0x0F */
861 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x10 - 0x1F */
862 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63, /* 0x20 - 0x2F */
863 + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1, /* 0x30 - 0x3F */
864 + -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, /* 0x40 - 0x4F */
865 + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, /* 0x50 - 0x5F */
866 + -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, /* 0x60 - 0x6F */
867 + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1, /* 0x70 - 0x7F */
868 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x80 - 0x8F */
869 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x90 - 0x9F */
870 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xA0 - 0xAF */
871 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xB0 - 0xBF */
872 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xC0 - 0xCF */
873 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xD0 - 0xDF */
874 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xE0 - 0xEF */
875 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xF0 - 0xFF */
881 } else if (p->conf.auth_backend == AUTH_BACKEND_LDAP) {
885 LDAPMessage *lm, *first;
888 @@ -742,56 +745,45 @@
889 buffer_append_string_buffer(p->ldap_filter, username);
890 buffer_append_string_buffer(p->ldap_filter, p->conf.ldap_filter_post);
894 - if (p->conf.ldap == NULL ||
895 - 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))) {
896 - /* try again if ldap was only temporary down */
897 - 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))) {
898 - if (auth_ldap_init(srv, &p->conf) != HANDLER_GO_ON)
899 + if (p->anon_conf->ldap == NULL ||
900 + 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))) {
902 + /* try again; the ldap library sometimes fails for the first call but reconnects */
903 + if (p->anon_conf->ldap == NULL || ret != LDAP_SERVER_DOWN ||
904 + 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))) {
906 + if (auth_ldap_init(srv, p->anon_conf) != HANDLER_GO_ON)
909 - ldap = p->conf.ldap; /* save temporary ldap connection (TODO: redo ldap) */
910 - 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))) {
911 + if (p->anon_conf->ldap == NULL ||
912 + 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))) {
913 log_error_write(srv, __FILE__, __LINE__, "sssb",
914 "ldap:", ldap_err2string(ret), "filter:", p->ldap_filter);
915 - /* destroy temporary ldap connection (TODO: redo ldap) */
916 - ldap_unbind_s(ldap);
922 - if (NULL == (first = ldap_first_entry(p->conf.ldap, lm))) {
923 - /* No matching entry is not an error */
924 - /* log_error_write(srv, __FILE__, __LINE__, "s", "ldap ..."); */
925 + if (NULL == (first = ldap_first_entry(p->anon_conf->ldap, lm))) {
926 + log_error_write(srv, __FILE__, __LINE__, "s", "ldap ...");
930 - /* destroy temporary ldap connection (TODO: redo ldap) */
931 - if (NULL != ldap) {
932 - ldap_unbind_s(ldap);
937 - if (NULL == (dn = ldap_get_dn(p->conf.ldap, first))) {
938 - log_error_write(srv, __FILE__, __LINE__, "s", "ldap: ldap_get_dn failed");
939 + if (NULL == (dn = ldap_get_dn(p->anon_conf->ldap, first))) {
940 + log_error_write(srv, __FILE__, __LINE__, "s", "ldap ...");
944 - /* destroy temporary ldap connection (TODO: redo ldap) */
945 - if (NULL != ldap) {
946 - ldap_unbind_s(ldap);
953 - /* destroy temporary ldap connection (TODO: redo ldap) */
954 - if (NULL != ldap) {
955 - ldap_unbind_s(ldap);
959 if (NULL == (ldap = ldap_init(p->conf.auth_ldap_hostname->ptr, LDAP_PORT))) {
960 Index: src/mod_redirect.c
961 ===================================================================
962 --- src/mod_redirect.c (.../tags/lighttpd-1.4.20) (revision 2392)
963 +++ src/mod_redirect.c (.../branches/lighttpd-1.4.x) (revision 2392)
966 mod_redirect_patch_connection(srv, con, p);
968 - buffer_copy_string_buffer(p->match_buf, con->uri.path);
969 - if (con->uri.query->used > 0) {
970 - buffer_append_string_len(p->match_buf, CONST_STR_LEN("?"));
971 - buffer_append_string_buffer(p->match_buf, con->uri.query);
973 + buffer_copy_string_buffer(p->match_buf, con->request.uri);
975 for (i = 0; i < p->conf.redirect->used; i++) {
977 Index: src/http_auth.h
978 ===================================================================
979 --- src/http_auth.h (.../tags/lighttpd-1.4.20) (revision 2392)
980 +++ src/http_auth.h (.../branches/lighttpd-1.4.x) (revision 2392)
983 mod_auth_plugin_config **config_storage;
985 - mod_auth_plugin_config conf; /* this is only used as long as no handler_ctx is setup */
986 + mod_auth_plugin_config conf, *anon_conf; /* this is only used as long as no handler_ctx is setup */
987 } mod_auth_plugin_data;
989 int http_auth_basic_check(server *srv, connection *con, mod_auth_plugin_data *p, array *req, buffer *url, const char *realm_str);
990 Index: src/mod_webdav.c
991 ===================================================================
992 --- src/mod_webdav.c (.../tags/lighttpd-1.4.20) (revision 2392)
993 +++ src/mod_webdav.c (.../branches/lighttpd-1.4.x) (revision 2392)
994 @@ -1026,6 +1026,8 @@
995 if (MAP_FAILED == (c->file.mmap.start = mmap(0, c->file.length, PROT_READ, MAP_SHARED, c->file.fd, 0))) {
996 log_error_write(srv, __FILE__, __LINE__, "ssbd", "mmap failed: ",
997 strerror(errno), c->file.name, c->file.fd);
1003 @@ -1723,6 +1725,8 @@
1004 if (MAP_FAILED == (c->file.mmap.start = mmap(0, c->file.length, PROT_READ, MAP_SHARED, c->file.fd, 0))) {
1005 log_error_write(srv, __FILE__, __LINE__, "ssbd", "mmap failed: ",
1006 strerror(errno), c->file.name, c->file.fd);
1007 + close(c->file.fd);
1010 return HANDLER_ERROR;
1012 Index: src/configparser.y
1013 ===================================================================
1014 --- src/configparser.y (.../tags/lighttpd-1.4.20) (revision 2392)
1015 +++ src/configparser.y (.../branches/lighttpd-1.4.x) (revision 2392)
1017 { COMP_HTTP_REFERER, CONST_STR_LEN("HTTP[\"referer\"]" ) },
1018 { COMP_HTTP_USER_AGENT, CONST_STR_LEN("HTTP[\"useragent\"]" ) },
1019 { COMP_HTTP_USER_AGENT, CONST_STR_LEN("HTTP[\"user-agent\"]" ) },
1020 + { COMP_HTTP_LANGUAGE, CONST_STR_LEN("HTTP[\"language\"]" ) },
1021 { COMP_HTTP_COOKIE, CONST_STR_LEN("HTTP[\"cookie\"]" ) },
1022 { COMP_HTTP_REMOTE_IP, CONST_STR_LEN("HTTP[\"remoteip\"]" ) },
1023 { COMP_HTTP_REMOTE_IP, CONST_STR_LEN("HTTP[\"remote-ip\"]" ) },
1024 Index: src/mod_compress.c
1025 ===================================================================
1026 --- src/mod_compress.c (.../tags/lighttpd-1.4.20) (revision 2392)
1027 +++ src/mod_compress.c (.../branches/lighttpd-1.4.x) (revision 2392)
1029 buffer *compress_cache_dir;
1031 off_t compress_max_filesize; /** max filesize in kb */
1032 + int allowed_encodings;
1037 { "compress.cache-dir", NULL, T_CONFIG_STRING, T_CONFIG_SCOPE_CONNECTION },
1038 { "compress.filetype", NULL, T_CONFIG_ARRAY, T_CONFIG_SCOPE_CONNECTION },
1039 { "compress.max-filesize", NULL, T_CONFIG_SHORT, T_CONFIG_SCOPE_CONNECTION },
1040 + { "compress.allowed-encodings", NULL, T_CONFIG_ARRAY, T_CONFIG_SCOPE_CONNECTION },
1041 { NULL, NULL, T_CONFIG_UNSET, T_CONFIG_SCOPE_UNSET }
1044 @@ -161,15 +163,18 @@
1046 for (i = 0; i < srv->config_context->used; i++) {
1048 + array *encodings_arr = array_init();
1050 s = calloc(1, sizeof(plugin_config));
1051 s->compress_cache_dir = buffer_init();
1052 s->compress = array_init();
1053 s->compress_max_filesize = 0;
1054 + s->allowed_encodings = 0;
1056 cv[0].destination = s->compress_cache_dir;
1057 cv[1].destination = s->compress;
1058 cv[2].destination = &(s->compress_max_filesize);
1059 + cv[3].destination = encodings_arr; /* temp array for allowed encodings list */
1061 p->config_storage[i] = s;
1063 @@ -177,6 +182,39 @@
1064 return HANDLER_ERROR;
1067 + if (encodings_arr->used) {
1069 + for (j = 0; j < encodings_arr->used; j++) {
1070 + data_string *ds = (data_string *)encodings_arr->data[j];
1072 + if (NULL != strstr(ds->value->ptr, "gzip"))
1073 + s->allowed_encodings |= HTTP_ACCEPT_ENCODING_GZIP;
1074 + if (NULL != strstr(ds->value->ptr, "deflate"))
1075 + s->allowed_encodings |= HTTP_ACCEPT_ENCODING_DEFLATE;
1077 + if (NULL != strstr(ds->value->ptr, "compress"))
1078 + s->allowed_encodings |= HTTP_ACCEPT_ENCODING_COMPRESS;
1082 + if (NULL != strstr(ds->value->ptr, "bzip2"))
1083 + s->allowed_encodings |= HTTP_ACCEPT_ENCODING_BZIP2;
1087 + /* default encodings */
1088 + s->allowed_encodings = 0
1090 + | HTTP_ACCEPT_ENCODING_GZIP | HTTP_ACCEPT_ENCODING_DEFLATE
1093 + | HTTP_ACCEPT_ENCODING_BZIP2
1098 + array_free(encodings_arr);
1100 if (!buffer_is_empty(s->compress_cache_dir)) {
1102 mkdir_recursive(s->compress_cache_dir->ptr);
1104 PATCH(compress_cache_dir);
1106 PATCH(compress_max_filesize);
1107 + PATCH(allowed_encodings);
1109 /* skip the first, the global context */
1110 for (i = 1; i < srv->config_context->used; i++) {
1113 } else if (buffer_is_equal_string(du->key, CONST_STR_LEN("compress.max-filesize"))) {
1114 PATCH(compress_max_filesize);
1115 + } else if (buffer_is_equal_string(du->key, CONST_STR_LEN("compress.allowed-encodings"))) {
1116 + PATCH(allowed_encodings);
1123 stat_cache_entry *sce = NULL;
1124 + buffer *mtime = NULL;
1126 if (con->mode != DIRECT || con->http_status) return HANDLER_GO_ON;
1128 @@ -636,8 +678,30 @@
1130 max_fsize = p->conf.compress_max_filesize;
1132 - stat_cache_get_entry(srv, con, con->physical.path, &sce);
1133 + if (con->conf.log_request_handling) {
1134 + log_error_write(srv, __FILE__, __LINE__, "s", "-- handling file as static file");
1137 + if (HANDLER_ERROR == stat_cache_get_entry(srv, con, con->physical.path, &sce)) {
1138 + con->http_status = 403;
1140 + log_error_write(srv, __FILE__, __LINE__, "sbsb",
1141 + "not a regular file:", con->uri.path,
1142 + "->", con->physical.path);
1144 + return HANDLER_FINISHED;
1147 + /* we only handle regular files */
1149 + if ((sce->is_symlink == 1) && !con->conf.follow_symlink) {
1150 + return HANDLER_GO_ON;
1153 + if (!S_ISREG(sce->st.st_mode)) {
1154 + return HANDLER_GO_ON;
1157 /* don't compress files that are too large as we need to much time to handle them */
1158 if (max_fsize && (sce->st.st_size >> 10) > max_fsize) return HANDLER_GO_ON;
1160 @@ -668,27 +732,21 @@
1161 if (NULL != (ds = (data_string *)array_get_element(con->request.headers, "Accept-Encoding"))) {
1162 int accept_encoding = 0;
1163 char *value = ds->value->ptr;
1164 - int srv_encodings = 0;
1165 int matched_encodings = 0;
1167 /* get client side support encodings */
1169 if (NULL != strstr(value, "gzip")) accept_encoding |= HTTP_ACCEPT_ENCODING_GZIP;
1170 if (NULL != strstr(value, "deflate")) accept_encoding |= HTTP_ACCEPT_ENCODING_DEFLATE;
1171 if (NULL != strstr(value, "compress")) accept_encoding |= HTTP_ACCEPT_ENCODING_COMPRESS;
1174 if (NULL != strstr(value, "bzip2")) accept_encoding |= HTTP_ACCEPT_ENCODING_BZIP2;
1176 if (NULL != strstr(value, "identity")) accept_encoding |= HTTP_ACCEPT_ENCODING_IDENTITY;
1178 - /* get server side supported ones */
1180 - srv_encodings |= HTTP_ACCEPT_ENCODING_BZIP2;
1183 - srv_encodings |= HTTP_ACCEPT_ENCODING_GZIP;
1184 - srv_encodings |= HTTP_ACCEPT_ENCODING_DEFLATE;
1187 /* find matching entries */
1188 - matched_encodings = accept_encoding & srv_encodings;
1189 + matched_encodings = accept_encoding & p->conf.allowed_encodings;
1191 if (matched_encodings) {
1192 const char *dflt_gzip = "gzip";
1193 @@ -698,6 +756,17 @@
1194 const char *compression_name = NULL;
1195 int compression_type = 0;
1197 + mtime = strftime_cache_get(srv, sce->st.st_mtime);
1199 + /* try matching original etag of uncompressed version */
1200 + etag_mutate(con->physical.etag, sce->etag);
1201 + if (HANDLER_FINISHED == http_response_handle_cachable(srv, con, mtime)) {
1202 + response_header_overwrite(srv, con, CONST_STR_LEN("Content-Type"), CONST_BUF_LEN(sce->content_type));
1203 + response_header_overwrite(srv, con, CONST_STR_LEN("Last-Modified"), CONST_BUF_LEN(mtime));
1204 + response_header_overwrite(srv, con, CONST_STR_LEN("ETag"), CONST_BUF_LEN(con->physical.etag));
1205 + return HANDLER_FINISHED;
1208 /* select best matching encoding */
1209 if (matched_encodings & HTTP_ACCEPT_ENCODING_BZIP2) {
1210 compression_type = HTTP_ACCEPT_ENCODING_BZIP2;
1211 @@ -710,41 +779,34 @@
1212 compression_name = dflt_deflate;
1216 - if (p->conf.compress_cache_dir->used) {
1217 - if (0 == deflate_file_to_file(srv, con, p,
1218 - con->physical.path, sce, compression_type)) {
1220 + /* try matching etag of compressed version */
1221 + buffer_copy_string_buffer(srv->tmp_buf, sce->etag);
1222 + buffer_append_string_len(srv->tmp_buf, CONST_STR_LEN("-"));
1223 + buffer_append_string(srv->tmp_buf, compression_name);
1224 + etag_mutate(con->physical.etag, srv->tmp_buf);
1226 - response_header_overwrite(srv, con, CONST_STR_LEN("Content-Encoding"), compression_name, strlen(compression_name));
1228 - mtime = strftime_cache_get(srv, sce->st.st_mtime);
1229 - response_header_overwrite(srv, con, CONST_STR_LEN("Last-Modified"), CONST_BUF_LEN(mtime));
1231 - etag_mutate(con->physical.etag, sce->etag);
1232 - response_header_overwrite(srv, con, CONST_STR_LEN("ETag"), CONST_BUF_LEN(con->physical.etag));
1234 - response_header_overwrite(srv, con, CONST_STR_LEN("Content-Type"), CONST_BUF_LEN(sce->content_type));
1236 - return HANDLER_GO_ON;
1238 - } else if (0 == deflate_file_to_buffer(srv, con, p,
1239 - con->physical.path, sce, compression_type)) {
1242 + if (HANDLER_FINISHED == http_response_handle_cachable(srv, con, mtime)) {
1243 response_header_overwrite(srv, con, CONST_STR_LEN("Content-Encoding"), compression_name, strlen(compression_name));
1245 - mtime = strftime_cache_get(srv, sce->st.st_mtime);
1246 + response_header_overwrite(srv, con, CONST_STR_LEN("Content-Type"), CONST_BUF_LEN(sce->content_type));
1247 response_header_overwrite(srv, con, CONST_STR_LEN("Last-Modified"), CONST_BUF_LEN(mtime));
1249 - etag_mutate(con->physical.etag, sce->etag);
1250 response_header_overwrite(srv, con, CONST_STR_LEN("ETag"), CONST_BUF_LEN(con->physical.etag));
1252 - response_header_overwrite(srv, con, CONST_STR_LEN("Content-Type"), CONST_BUF_LEN(sce->content_type));
1254 return HANDLER_FINISHED;
1259 + if (p->conf.compress_cache_dir->used) {
1260 + if (0 != deflate_file_to_file(srv, con, p, con->physical.path, sce, compression_type))
1261 + return HANDLER_GO_ON;
1263 + if (0 != deflate_file_to_buffer(srv, con, p, con->physical.path, sce, compression_type))
1264 + return HANDLER_GO_ON;
1266 + response_header_overwrite(srv, con, CONST_STR_LEN("Content-Encoding"), compression_name, strlen(compression_name));
1267 + response_header_overwrite(srv, con, CONST_STR_LEN("Last-Modified"), CONST_BUF_LEN(mtime));
1268 + response_header_overwrite(srv, con, CONST_STR_LEN("ETag"), CONST_BUF_LEN(con->physical.etag));
1269 + response_header_overwrite(srv, con, CONST_STR_LEN("Content-Type"), CONST_BUF_LEN(sce->content_type));
1270 + /* let mod_staticfile handle the cached compressed files, physical path was modified */
1271 + return p->conf.compress_cache_dir->used ? HANDLER_GO_ON : HANDLER_FINISHED;
1275 Index: src/spawn-fcgi.c
1276 ===================================================================
1277 --- src/spawn-fcgi.c (.../tags/lighttpd-1.4.20) (revision 2392)
1278 +++ src/spawn-fcgi.c (.../branches/lighttpd-1.4.x) (revision 2392)
1283 - memset(&fcgi_addr, 0, sizeof(fcgi_addr));
1284 + memset(&fcgi_addr_un, 0, sizeof(fcgi_addr_un));
1286 fcgi_addr_un.sun_family = AF_UNIX;
1287 strcpy(fcgi_addr_un.sun_path, unixsocket);
1289 socket_type = AF_UNIX;
1290 fcgi_addr = (struct sockaddr *) &fcgi_addr_un;
1292 + memset(&fcgi_addr_in, 0, sizeof(fcgi_addr_in));
1293 fcgi_addr_in.sin_family = AF_INET;
1294 - if (addr != NULL) {
1295 - fcgi_addr_in.sin_addr.s_addr = inet_addr(addr);
1297 - fcgi_addr_in.sin_addr.s_addr = htonl(INADDR_ANY);
1299 + if (addr != NULL) {
1300 + fcgi_addr_in.sin_addr.s_addr = inet_addr(addr);
1302 + fcgi_addr_in.sin_addr.s_addr = htonl(INADDR_ANY);
1304 fcgi_addr_in.sin_port = htons(port);
1305 servlen = sizeof(fcgi_addr_in);
1307 Index: src/mod_auth.c
1308 ===================================================================
1309 --- src/mod_auth.c (.../tags/lighttpd-1.4.20) (revision 2392)
1310 +++ src/mod_auth.c (.../branches/lighttpd-1.4.x) (revision 2392)
1312 PATCH(auth_ldap_starttls);
1313 PATCH(auth_ldap_allow_empty_pw);
1317 PATCH(ldap_filter_pre);
1318 PATCH(ldap_filter_post);
1321 } else if (buffer_is_equal_string(du->key, CONST_STR_LEN("auth.backend.ldap.hostname"))) {
1322 PATCH(auth_ldap_hostname);
1327 } else if (buffer_is_equal_string(du->key, CONST_STR_LEN("auth.backend.ldap.base-dn"))) {
1328 PATCH(auth_ldap_basedn);
1333 - switch(s->auth_backend) {
1334 + switch(s->auth_ldap_hostname->used) {
1335 case AUTH_BACKEND_LDAP: {
1336 handler_t ret = auth_ldap_init(srv, s);
1337 if (ret == HANDLER_ERROR)
1341 if (s->auth_ldap_hostname->used) {
1342 + /* free old context */
1343 + if (NULL != s->ldap) ldap_unbind_s(s->ldap);
1345 if (NULL == (s->ldap = ldap_init(s->auth_ldap_hostname->ptr, LDAP_PORT))) {
1346 log_error_write(srv, __FILE__, __LINE__, "ss", "ldap ...", strerror(errno));
1348 Index: src/http-header-glue.c
1349 ===================================================================
1350 --- src/http-header-glue.c (.../tags/lighttpd-1.4.20) (revision 2392)
1351 +++ src/http-header-glue.c (.../branches/lighttpd-1.4.x) (revision 2392)
1353 strncpy(buf, con->request.http_if_modified_since, used_len);
1354 buf[used_len] = '\0';
1357 if (NULL == strptime(buf, "%a, %d %b %Y %H:%M:%S GMT", &tm)) {
1358 con->http_status = 412;
1361 strncpy(buf, con->request.http_if_modified_since, used_len);
1362 buf[used_len] = '\0';
1365 if (NULL == strptime(buf, "%a, %d %b %Y %H:%M:%S GMT", &tm)) {
1367 * parsing failed, let's get out of here
1368 Index: src/mod_fastcgi.c
1369 ===================================================================
1370 --- src/mod_fastcgi.c (.../tags/lighttpd-1.4.20) (revision 2392)
1371 +++ src/mod_fastcgi.c (.../branches/lighttpd-1.4.x) (revision 2392)
1372 @@ -3252,6 +3252,7 @@
1373 fcgi_connection_close(srv, hctx);
1376 + con->http_status = 0;
1377 con->file_started = 1; /* fcgi_extension won't touch the request afterwards */
1380 @@ -3608,47 +3609,50 @@
1381 "handling it in mod_fastcgi");
1384 - /* the prefix is the SCRIPT_NAME,
1385 - * everything from start to the next slash
1386 - * this is important for check-local = "disable"
1388 - * if prefix = /admin.fcgi
1390 - * /admin.fcgi/foo/bar
1392 - * SCRIPT_NAME = /admin.fcgi
1393 - * PATH_INFO = /foo/bar
1395 - * if prefix = /fcgi-bin/
1397 - * /fcgi-bin/foo/bar
1399 - * SCRIPT_NAME = /fcgi-bin/foo
1400 - * PATH_INFO = /bar
1402 - * if prefix = /, and fix-root-path-name is enable
1404 - * /fcgi-bin/foo/bar
1406 - * SCRIPT_NAME = /fcgi-bin/foo
1407 - * PATH_INFO = /bar
1410 + /* do not split path info for authorizer */
1411 + if (host->mode != FCGI_AUTHORIZER) {
1412 + /* the prefix is the SCRIPT_NAME,
1413 + * everything from start to the next slash
1414 + * this is important for check-local = "disable"
1416 + * if prefix = /admin.fcgi
1418 + * /admin.fcgi/foo/bar
1420 + * SCRIPT_NAME = /admin.fcgi
1421 + * PATH_INFO = /foo/bar
1423 + * if prefix = /fcgi-bin/
1425 + * /fcgi-bin/foo/bar
1427 + * SCRIPT_NAME = /fcgi-bin/foo
1428 + * PATH_INFO = /bar
1430 + * if prefix = /, and fix-root-path-name is enable
1432 + * /fcgi-bin/foo/bar
1434 + * SCRIPT_NAME = /fcgi-bin/foo
1435 + * PATH_INFO = /bar
1439 - /* the rewrite is only done for /prefix/? matches */
1440 - if (extension->key->ptr[0] == '/' &&
1441 - con->uri.path->used > extension->key->used &&
1442 - NULL != (pathinfo = strchr(con->uri.path->ptr + extension->key->used - 1, '/'))) {
1443 - /* rewrite uri.path and pathinfo */
1444 + /* the rewrite is only done for /prefix/? matches */
1445 + if (extension->key->ptr[0] == '/' &&
1446 + con->uri.path->used > extension->key->used &&
1447 + NULL != (pathinfo = strchr(con->uri.path->ptr + extension->key->used - 1, '/'))) {
1448 + /* rewrite uri.path and pathinfo */
1450 - buffer_copy_string(con->request.pathinfo, pathinfo);
1451 + buffer_copy_string(con->request.pathinfo, pathinfo);
1453 - con->uri.path->used -= con->request.pathinfo->used - 1;
1454 - con->uri.path->ptr[con->uri.path->used - 1] = '\0';
1455 - } else if (host->fix_root_path_name && extension->key->ptr[0] == '/' && extension->key->ptr[1] == '\0') {
1456 - buffer_copy_string(con->request.pathinfo, con->uri.path->ptr);
1457 - con->uri.path->used = 1;
1458 - con->uri.path->ptr[con->uri.path->used - 1] = '\0';
1459 + con->uri.path->used -= con->request.pathinfo->used - 1;
1460 + con->uri.path->ptr[con->uri.path->used - 1] = '\0';
1461 + } else if (host->fix_root_path_name && extension->key->ptr[0] == '/' && extension->key->ptr[1] == '\0') {
1462 + buffer_copy_string(con->request.pathinfo, con->uri.path->ptr);
1463 + con->uri.path->used = 1;
1464 + con->uri.path->ptr[con->uri.path->used - 1] = '\0';
1469 Index: src/CMakeLists.txt
1470 ===================================================================
1471 --- src/CMakeLists.txt (.../tags/lighttpd-1.4.20) (revision 0)
1472 +++ src/CMakeLists.txt (.../branches/lighttpd-1.4.x) (revision 2392)
1474 +INCLUDE(CheckCSourceCompiles)
1475 +INCLUDE(CheckIncludeFiles)
1476 +INCLUDE(CheckFunctionExists)
1477 +INCLUDE(CheckVariableExists)
1478 +INCLUDE(CheckTypeSize)
1479 +INCLUDE(CheckLibraryExists)
1480 +INCLUDE(CMakeDetermineCCompiler)
1481 +INCLUDE(FindThreads)
1482 +INCLUDE(FindPkgConfig)
1484 +INCLUDE(LighttpdMacros)
1486 +ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES)
1488 +OPTION(WITH_XATTR "with xattr-support for the stat-cache [default: off]")
1489 +OPTION(WITH_MYSQL "with mysql-support for the mod_sql_vhost [default: off]")
1490 +# OPTION(WITH_POSTGRESQL "with postgress-support for the mod_sql_vhost [default: off]")
1491 +OPTION(WITH_OPENSSL "with openssl-support [default: off]")
1492 +OPTION(WITH_PCRE "with regex support [default: on]" ON)
1493 +OPTION(WITH_WEBDAV_PROPS "with property-support for mod_webdav [default: off]")
1494 +OPTION(WITH_WEBDAV_LOCKS "locks in webdav [default: off]")
1495 +OPTION(WITH_BZIP "with bzip2-support for mod_compress [default: off]")
1496 +OPTION(WITH_ZLIB "with deflate-support for mod_compress [default: on]" ON)
1497 +OPTION(WITH_LDAP "with LDAP-support for the mod_auth [default: off]")
1498 +OPTION(WITH_LUA "with lua 5.1 for mod_magnet [default: off]")
1499 +# OPTION(WITH_VALGRIND "with internal support for valgrind [default: off]")
1500 +# OPTION(WITH_KERBEROS5 "use Kerberos5 support with OpenSSL [default: off]")
1501 +OPTION(WITH_FAM "fam/gamin for reducing number of stat() calls [default: off]")
1502 +OPTION(WITH_GDBM "gdbm storage for mod_trigger_b4_dl [default: off]")
1503 +OPTION(WITH_MEMCACHE "memcached storage for mod_trigger_b4_dl [default: off]")
1505 +OPTION(BUILD_STATIC "build a static lighttpd with all modules added")
1508 + SET(LIGHTTPD_STATIC 1)
1510 + SET(CMAKE_SHARED_LIBRARY_PREFIX "")
1511 +ENDIF(BUILD_STATIC)
1513 +IF(WITH_WEBDAV_PROPS)
1515 + SET(WITH_SQLITE3 1)
1517 +ENDIF(WITH_WEBDAV_PROPS)
1519 +CHECK_INCLUDE_FILES(sys/devpoll.h HAVE_SYS_DEVPOLL_H)
1520 +CHECK_INCLUDE_FILES(sys/epoll.h HAVE_SYS_EPOLL_H)
1521 +CHECK_INCLUDE_FILES(sys/event.h HAVE_SYS_EVENT_H)
1522 +CHECK_INCLUDE_FILES(sys/mman.h HAVE_SYS_MMAN_H)
1523 +CHECK_INCLUDE_FILES(sys/poll.h HAVE_SYS_POLL_H)
1524 +CHECK_INCLUDE_FILES(sys/port.h HAVE_SYS_PORT_H)
1525 +CHECK_INCLUDE_FILES(sys/prctl.h HAVE_SYS_PRCTL_H)
1526 +CHECK_INCLUDE_FILES(sys/resource.h HAVE_SYS_RESOURCE_H)
1527 +CHECK_INCLUDE_FILES(sys/sendfile.h HAVE_SYS_SENDFILE_H)
1528 +CHECK_INCLUDE_FILES(sys/select.h HAVE_SYS_SELECT_H)
1529 +CHECK_INCLUDE_FILES(sys/syslimits.h HAVE_SYS_SYSLIMITS_H)
1530 +CHECK_INCLUDE_FILES(sys/types.h HAVE_SYS_TYPES_H)
1531 +CHECK_INCLUDE_FILES(sys/uio.h HAVE_SYS_UIO_H)
1532 +CHECK_INCLUDE_FILES(sys/un.h HAVE_SYS_UN_H)
1533 +CHECK_INCLUDE_FILES(sys/wait.h HAVE_SYS_WAIT_H)
1534 +CHECK_INCLUDE_FILES(sys/time.h HAVE_SYS_TIME_H)
1535 +CHECK_INCLUDE_FILES(unistd.h HAVE_UNISTD_H)
1536 +CHECK_INCLUDE_FILES(pthread.h HAVE_PTHREAD_H)
1537 +CHECK_INCLUDE_FILES(getopt.h HAVE_GETOPT_H)
1538 +CHECK_INCLUDE_FILES(inttypes.h HAVE_INTTYPES_H)
1539 +CHECK_INCLUDE_FILES(poll.h HAVE_POLL_H)
1540 +CHECK_INCLUDE_FILES(pwd.h HAVE_PWD_H)
1541 +CHECK_INCLUDE_FILES(stddef.h HAVE_STDDEF_H)
1542 +CHECK_INCLUDE_FILES(stdint.h HAVE_STDINT_H)
1543 +CHECK_INCLUDE_FILES(syslog.h HAVE_SYSLOG_H)
1545 +# check for fastcgi lib, for the tests only
1546 +CHECK_INCLUDE_FILES(fastcgi.h HAVE_FASTCGI_H)
1547 +CHECK_INCLUDE_FILES(fastcgi/fastcgi.h HAVE_FASTCGI_FASTCGI_H)
1549 +CHECK_INCLUDE_FILES(crypt.h HAVE_CRYPT_H)
1551 + ## check if we need libcrypt for crypt()
1552 + CHECK_LIBRARY_EXISTS(crypt crypt "" HAVE_LIBCRYPT)
1553 +ENDIF(HAVE_CRYPT_H)
1555 +CHECK_INCLUDE_FILES(sys/inotify.h HAVE_SYS_INOTIFY_H)
1556 +IF(HAVE_SYS_INOTIFY_H)
1557 + CHECK_FUNCTION_EXISTS(inotify_init HAVE_INOTIFY_INIT)
1558 +ENDIF(HAVE_SYS_INOTIFY_H)
1560 +SET(CMAKE_EXTRA_INCLUDE_FILES sys/socket.h)
1561 +CHECK_TYPE_SIZE(socklen_t HAVE_SOCKLEN_T)
1562 +SET(CMAKE_EXTRA_INCLUDE_FILES)
1564 +CHECK_TYPE_SIZE(long SIZEOF_LONG)
1565 +CHECK_TYPE_SIZE(off_t SIZEOF_OFF_T)
1567 +CHECK_FUNCTION_EXISTS(chroot HAVE_CHROOT)
1568 +CHECK_FUNCTION_EXISTS(crypt HAVE_CRYPT)
1569 +CHECK_FUNCTION_EXISTS(epoll_ctl HAVE_EPOLL_CTL)
1570 +CHECK_FUNCTION_EXISTS(fork HAVE_FORK)
1571 +CHECK_FUNCTION_EXISTS(getrlimit HAVE_GETRLIMIT)
1572 +CHECK_FUNCTION_EXISTS(getuid HAVE_GETUID)
1573 +CHECK_FUNCTION_EXISTS(gmtime_r HAVE_GMTIME_R)
1574 +CHECK_FUNCTION_EXISTS(inet_ntop HAVE_INET_NTOP)
1575 +CHECK_FUNCTION_EXISTS(kqueue HAVE_KQUEUE)
1576 +CHECK_FUNCTION_EXISTS(localtime_r HAVE_LOCALTIME_R)
1577 +CHECK_FUNCTION_EXISTS(lstat HAVE_LSTAT)
1578 +CHECK_FUNCTION_EXISTS(madvise HAVE_MADVISE)
1579 +CHECK_FUNCTION_EXISTS(memcpy HAVE_MEMCPY)
1580 +CHECK_FUNCTION_EXISTS(memset HAVE_MEMSET)
1581 +CHECK_FUNCTION_EXISTS(mmap HAVE_MMAP)
1582 +CHECK_FUNCTION_EXISTS(pathconf HAVE_PATHCONF)
1583 +CHECK_FUNCTION_EXISTS(poll HAVE_POLL)
1584 +CHECK_FUNCTION_EXISTS(port_create HAVE_PORT_CREATE)
1585 +CHECK_FUNCTION_EXISTS(prctl HAVE_PRCTL)
1586 +CHECK_FUNCTION_EXISTS(pread HAVE_PREAD)
1587 +CHECK_FUNCTION_EXISTS(posix_fadvise HAVE_POSIX_FADVISE)
1588 +CHECK_FUNCTION_EXISTS(select HAVE_SELECT)
1589 +CHECK_FUNCTION_EXISTS(sendfile HAVE_SENDFILE)
1590 +CHECK_FUNCTION_EXISTS(send_file HAVE_SEND_FILE)
1591 +CHECK_FUNCTION_EXISTS(sendfile64 HAVE_SENDFILE64)
1592 +CHECK_FUNCTION_EXISTS(sendfilev HAVE_SENDFILEV)
1593 +CHECK_FUNCTION_EXISTS(sigaction HAVE_SIGACTION)
1594 +CHECK_FUNCTION_EXISTS(signal HAVE_SIGNAL)
1595 +CHECK_FUNCTION_EXISTS(sigtimedwait HAVE_SIGTIMEDWAIT)
1596 +CHECK_FUNCTION_EXISTS(strptime HAVE_STRPTIME)
1597 +CHECK_FUNCTION_EXISTS(syslog HAVE_SYSLOG)
1598 +CHECK_FUNCTION_EXISTS(writev HAVE_WRITEV)
1599 +CHECK_FUNCTION_EXISTS(inet_aton HAVE_INET_ATON)
1600 +CHECK_C_SOURCE_COMPILES("
1601 + #include <sys/types.h>
1602 + #include <sys/socket.h>
1603 + #include <netinet/in.h>
1606 + struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] = 0;
1611 +MACRO(XCONFIG _package _include_DIR _link_DIR _link_FLAGS _cflags)
1612 +# reset the variables at the beginning
1613 + SET(${_include_DIR})
1615 + SET(${_link_FLAGS})
1618 + FIND_PROGRAM(${_package}CONFIG_EXECUTABLE NAMES ${_package} PATHS /usr/local/bin )
1620 + # if pkg-config has been found
1621 + IF(${_package}CONFIG_EXECUTABLE)
1622 + SET(XCONFIG_EXECUTABLE "${${_package}CONFIG_EXECUTABLE}")
1623 + MESSAGE(STATUS "found ${_package}: ${XCONFIG_EXECUTABLE}")
1625 + EXEC_PROGRAM(${XCONFIG_EXECUTABLE} ARGS --libs OUTPUT_VARIABLE __link_FLAGS)
1626 + STRING(REPLACE "\n" "" ${_link_FLAGS} ${__link_FLAGS})
1627 + EXEC_PROGRAM(${XCONFIG_EXECUTABLE} ARGS --cflags OUTPUT_VARIABLE __cflags)
1628 + STRING(REPLACE "\n" "" ${_cflags} ${__cflags})
1630 + ELSE(${_package}CONFIG_EXECUTABLE)
1631 + MESSAGE(STATUS "found ${_package}: no")
1632 + ENDIF(${_package}CONFIG_EXECUTABLE)
1633 +ENDMACRO(XCONFIG _package _include_DIR _link_DIR _link_FLAGS _cflags)
1636 + CHECK_INCLUDE_FILES(attr/attributes.h HAVE_ATTR_ATTRIBUTES_H)
1637 + CHECK_LIBRARY_EXISTS(attr attr_get "" HAVE_XATTR)
1641 + XCONFIG(mysql_config MYSQL_INCDIR MYSQL_LIBDIR MYSQL_LDFLAGS MYSQL_CFLAGS)
1643 + SET(CMAKE_REQUIRED_INCLUDES /usr/include/mysql)
1644 + CHECK_INCLUDE_FILES(mysql.h HAVE_MYSQL_H)
1645 + SET(CMAKE_REQUIRED_INCLUDES)
1647 + CHECK_LIBRARY_EXISTS(mysqlclient mysql_real_connect "" HAVE_MYSQL)
1648 + ENDIF(HAVE_MYSQL_H)
1652 + CHECK_INCLUDE_FILES(openssl/ssl.h HAVE_OPENSSL_SSL_H)
1653 + IF(HAVE_OPENSSL_SSL_H)
1654 + CHECK_LIBRARY_EXISTS(crypto BIO_f_base64 "" HAVE_LIBCRYPTO)
1655 + IF(HAVE_LIBCRYPTO)
1656 + SET(OPENSSL_NO_KRB5 1)
1657 + CHECK_LIBRARY_EXISTS(ssl SSL_new "" HAVE_LIBSSL)
1658 + ENDIF(HAVE_LIBCRYPTO)
1659 + ENDIF(HAVE_OPENSSL_SSL_H)
1660 +ENDIF(WITH_OPENSSL)
1663 + ## if we have pcre-config, use it
1664 + XCONFIG(pcre-config PCRE_INCDIR PCRE_LIBDIR PCRE_LDFLAGS PCRE_CFLAGS)
1665 + IF(PCRE_LDFLAGS OR PCRE_CFLAGS)
1666 + MESSAGE(STATUS "found pcre at: LDFLAGS: ${PCRE_LDFLAGS} CFLAGS: ${PCRE_CFLAGS}")
1668 + IF(NOT PCRE_CFLAGS STREQUAL "\n")
1669 + ## if it is empty we'll get newline returned
1670 + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PCRE_CFLAGS}")
1671 + ENDIF(NOT PCRE_CFLAGS STREQUAL "\n")
1673 + SET(HAVE_PCRE_H 1)
1674 + SET(HAVE_LIBPCRE 1)
1675 + ELSE(PCRE_LDFLAGS OR PCRE_CFLAGS)
1677 + CHECK_INCLUDE_FILES(pcre.h HAVE_PCRE_H)
1678 + CHECK_LIBRARY_EXISTS(pcre pcre_exec "" HAVE_LIBPCRE)
1679 + SET(PCRE_LDFLAGS -lpcre)
1681 + FIND_PATH(PCRE_INCLUDE_DIR pcre.h
1682 + /usr/local/include
1686 + SET(PCRE_NAMES pcre)
1687 + FIND_LIBRARY(PCRE_LIBRARY
1688 + NAMES ${PCRE_NAMES}
1689 + PATHS /usr/lib /usr/local/lib
1692 + IF(PCRE_INCLUDE_DIR AND PCRE_LIBRARY)
1693 + SET(CMAKE_REQUIRED_INCLUDES ${PCRE_INCLUDE_DIR})
1694 + SET(CMAKE_REQUIRED_LIBRARIES ${PCRE_LIBRARY})
1695 + CHECK_INCLUDE_FILES(pcre.h HAVE_PCRE_H)
1696 + CHECK_LIBRARY_EXISTS(pcre pcre_exec "" HAVE_LIBPCRE)
1697 + SET(CMAKE_REQUIRED_INCLUDES)
1698 + SET(CMAKE_REQUIRED_LIBRARIES)
1699 + INCLUDE_DIRECTORIES(${PCRE_INCLUDE_DIR})
1700 + ENDIF(PCRE_INCLUDE_DIR AND PCRE_LIBRARY)
1702 + ENDIF(PCRE_LDFLAGS OR PCRE_CFLAGS)
1704 + IF(NOT HAVE_PCRE_H)
1705 + MESSAGE(FATAL_ERROR "pcre.h couldn't be found")
1706 + ENDIF(NOT HAVE_PCRE_H)
1707 + IF(NOT HAVE_LIBPCRE)
1708 + MESSAGE(FATAL_ERROR "libpcre couldn't be found")
1709 + ENDIF(NOT HAVE_LIBPCRE)
1715 + XCONFIG(xml2-config XML2_INCDIR XML2_LIBDIR XML2_LDFLAGS XML2_CFLAGS)
1716 + IF(XML2_LDFLAGS OR XML2_CFLAGS)
1717 + MESSAGE(STATUS "found xml2 at: LDFLAGS: ${XML2_LDFLAGS} CFLAGS: ${XML2_CFLAGS}")
1719 + ## if it is empty we'll get newline returned
1720 + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${XML2_CFLAGS}")
1722 + CHECK_INCLUDE_FILES(libxml/tree.h HAVE_LIBXML_H)
1724 + SET(CMAKE_REQUIRED_FLAGS ${XML2_LDFLAGS})
1725 + CHECK_LIBRARY_EXISTS(xml2 xmlParseChunk "" HAVE_LIBXML)
1726 + SET(CMAKE_REQUIRED_FLAGS)
1727 + ELSE(XML2_LDFLAGS OR XML2_CFLAGS)
1728 + CHECK_INCLUDE_FILES(libxml.h HAVE_LIBXML_H)
1729 + CHECK_LIBRARY_EXISTS(xml2 xmlParseChunk "" HAVE_LIBXML)
1730 + ENDIF(XML2_LDFLAGS OR XML2_CFLAGS)
1732 + IF(NOT HAVE_LIBXML_H)
1733 + MESSAGE(FATAL_ERROR "libxml/tree.h couldn't be found")
1734 + ENDIF(NOT HAVE_LIBXML_H)
1735 + IF(NOT HAVE_LIBXML)
1736 + MESSAGE(FATAL_ERROR "libxml2 couldn't be found")
1737 + ENDIF(NOT HAVE_LIBXML)
1742 + CHECK_INCLUDE_FILES(sqlite3.h HAVE_SQLITE3_H)
1743 + CHECK_LIBRARY_EXISTS(sqlite3 sqlite3_reset "" HAVE_SQLITE3)
1744 +ENDIF(WITH_SQLITE3)
1747 + CHECK_INCLUDE_FILES(uuid/uuid.h HAVE_UUID_UUID_H)
1748 + CHECK_LIBRARY_EXISTS(uuid uuid_generate "" NEED_LIBUUID)
1749 + IF(NOT NEED_LIBUUID)
1750 + CHECK_FUNCTION_EXISTS(uuid_generate HAVE_LIBUUID)
1751 + ELSE(NOT NEED_LIBUUID)
1752 + SET(HAVE_LIBUUID 1)
1753 + ENDIF(NOT NEED_LIBUUID)
1758 + CHECK_INCLUDE_FILES(zlib.h HAVE_ZLIB_H)
1759 + CHECK_LIBRARY_EXISTS(z deflate "" HAVE_LIBZ)
1760 + SET(ZLIB_LIBRARY z)
1762 + FIND_PATH(ZLIB_INCLUDE_DIR zlib.h
1763 + /usr/local/include
1767 + SET(ZLIB_NAMES z zlib zdll)
1768 + FIND_LIBRARY(ZLIB_LIBRARY
1769 + NAMES ${ZLIB_NAMES}
1770 + PATHS /usr/lib /usr/local/lib
1774 + IF(ZLIB_INCLUDE_DIR AND ZLIB_LIBRARY)
1775 + SET(CMAKE_REQUIRED_INCLUDES ${ZLIB_INCLUDE_DIR})
1776 + SET(CMAKE_REQUIRED_LIBRARIES ${ZLIB_LIBRARY})
1777 + GET_FILENAME_COMPONENT(ZLIB_NAME ${ZLIB_LIBRARY} NAME)
1778 + CHECK_INCLUDE_FILES(zlib.h HAVE_ZLIB_H)
1779 + CHECK_LIBRARY_EXISTS(${ZLIB_NAME} deflate "" HAVE_LIBZ)
1780 + SET(CMAKE_REQUIRED_INCLUDES)
1781 + SET(CMAKE_REQUIRED_LIBRARIES)
1782 + INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR})
1784 + ENDIF(ZLIB_INCLUDE_DIR AND ZLIB_LIBRARY)
1789 + CHECK_INCLUDE_FILES(bzlib.h HAVE_BZLIB_H)
1790 + CHECK_LIBRARY_EXISTS(bz2 BZ2_bzCompress "" HAVE_LIBBZ2)
1794 + CHECK_INCLUDE_FILES(ldap.h HAVE_LDAP_H)
1795 + CHECK_LIBRARY_EXISTS(ldap ldap_bind "" HAVE_LIBLDAP)
1796 + CHECK_INCLUDE_FILES(lber.h HAVE_LBER_H)
1797 + CHECK_LIBRARY_EXISTS(lber ber_printf "" HAVE_LIBLBER)
1798 + SET(LDAP_DEPRECATED 1) # Using deprecated ldap api
1802 + pkg_search_module(LUA REQUIRED lua lua5.1)
1803 + MESSAGE(STATUS "found lua at: INCDIR: ${LUA_INCLUDE_DIRS} LIBDIR: ${LUA_LIBRARY_DIRS} LDFLAGS: ${LUA_LDFLAGS} CFLAGS: ${LUA_CFLAGS}")
1804 + SET(HAVE_LIBLUA 1 "Have liblua")
1805 + SET(HAVE_LUA_H 1 "Have liblua header")
1809 + CHECK_INCLUDE_FILES(fam.h HAVE_FAM_H)
1810 + CHECK_LIBRARY_EXISTS(fam FAMOpen2 "" HAVE_LIBFAM)
1812 + SET(CMAKE_REQUIRED_LIBRARIES fam)
1813 + CHECK_FUNCTION_EXISTS(FAMNoExists HAVE_FAMNOEXISTS)
1814 + ENDIF(HAVE_LIBFAM)
1818 + CHECK_INCLUDE_FILES(gdbm.h HAVE_GDBM_H)
1819 + CHECK_LIBRARY_EXISTS(gdbm gdbm_open "" HAVE_GDBM)
1823 + CHECK_INCLUDE_FILES(memcache.h HAVE_MEMCACHE_H)
1824 + CHECK_LIBRARY_EXISTS(memcache mc_new "" HAVE_MEMCACHE)
1825 +ENDIF(WITH_MEMCACHE)
1827 +IF(NOT BUILD_STATIC)
1828 + CHECK_INCLUDE_FILES(dlfcn.h HAVE_DLFCN_H)
1829 +ENDIF(NOT BUILD_STATIC)
1832 + CHECK_LIBRARY_EXISTS(dl dlopen "" HAVE_LIBDL)
1833 +ENDIF(HAVE_DLFCN_H)
1835 +SET(LIGHTTPD_VERSION_ID 10400)
1836 +SET(PACKAGE_NAME "${CMAKE_PROJECT_NAME}")
1837 +SET(PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}")
1838 +EXEC_PROGRAM(date ARGS "'+%b %d %Y %H:%M:%S UTC'" OUTPUT_VARIABLE PACKAGE_BUILD_DATE)
1841 + SET(SBINDIR "sbin")
1844 +IF(NOT LIGHTTPD_MODULES_DIR)
1845 + SET(LIGHTTPD_MODULES_DIR "lib${LIB_SUFFIX}/lighttpd")
1846 +ENDIF(NOT LIGHTTPD_MODULES_DIR)
1849 + SET(LIGHTTPD_LIBRARY_DIR "${CMAKE_INSTALL_PREFIX}/${LIGHTTPD_MODULES_DIR}")
1851 + ## We use relative path in windows
1852 + SET(LIGHTTPD_LIBRARY_DIR "lib")
1855 +## Write out config.h
1856 +CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
1858 +ADD_DEFINITIONS(-DHAVE_CONFIG_H)
1860 +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
1864 + keyvalue.c chunk.c
1865 + http_chunk.c stream.c fdevent.c
1866 + stat_cache.c plugin.c joblist.c etag.c array.c
1867 + data_string.c data_count.c data_array.c
1868 + data_integer.c md5.c data_fastcgi.c
1869 + fdevent_select.c fdevent_linux_rtsig.c
1870 + fdevent_poll.c fdevent_linux_sysepoll.c
1871 + fdevent_solaris_devpoll.c fdevent_freebsd_kqueue.c
1872 + data_config.c bitset.c
1873 + inet_ntop_cache.c crc32.c
1874 + connections-glue.c
1876 + http-header-glue.c
1877 + splaytree.c network_writev.c
1878 + network_write.c network_linux_sendfile.c
1879 + network_freebsd_sendfile.c
1880 + network_solaris_sendfilev.c network_openssl.c
1885 + MESSAGE(STATUS "Adding local getopt implementation.")
1886 + SET(COMMON_SRC ${COMMON_SRC} xgetopt.c)
1889 +ADD_EXECUTABLE(lemon lemon.c)
1891 +## Build parsers by using lemon...
1892 +LEMON_PARSER(configparser.y)
1893 +LEMON_PARSER(mod_ssi_exprparser.y)
1895 +SET(L_INSTALL_TARGETS)
1897 +ADD_EXECUTABLE(spawn-fcgi spawn-fcgi.c)
1898 +SET(L_INSTALL_TARGETS ${L_INSTALL_TARGETS} spawn-fcgi)
1900 +ADD_EXECUTABLE(lighttpd
1911 +SET(L_INSTALL_TARGETS ${L_INSTALL_TARGETS} lighttpd)
1913 +ADD_AND_INSTALL_LIBRARY(mod_access mod_access.c)
1914 +ADD_AND_INSTALL_LIBRARY(mod_accesslog mod_accesslog.c)
1915 +ADD_AND_INSTALL_LIBRARY(mod_alias mod_alias.c)
1916 +ADD_AND_INSTALL_LIBRARY(mod_auth "mod_auth.c;http_auth_digest.c;http_auth.c")
1918 +ADD_AND_INSTALL_LIBRARY(mod_cgi mod_cgi.c)
1920 +ADD_AND_INSTALL_LIBRARY(mod_cml "mod_cml.c;mod_cml_lua.c;mod_cml_funcs.c")
1921 +ADD_AND_INSTALL_LIBRARY(mod_compress mod_compress.c)
1922 +ADD_AND_INSTALL_LIBRARY(mod_dirlisting mod_dirlisting.c)
1923 +ADD_AND_INSTALL_LIBRARY(mod_evasive mod_evasive.c)
1924 +ADD_AND_INSTALL_LIBRARY(mod_evhost mod_evhost.c)
1925 +ADD_AND_INSTALL_LIBRARY(mod_expire mod_expire.c)
1926 +ADD_AND_INSTALL_LIBRARY(mod_extforward mod_extforward.c)
1927 +ADD_AND_INSTALL_LIBRARY(mod_fastcgi mod_fastcgi.c)
1928 +ADD_AND_INSTALL_LIBRARY(mod_flv_streaming mod_flv_streaming.c)
1929 +ADD_AND_INSTALL_LIBRARY(mod_indexfile mod_indexfile.c)
1930 +ADD_AND_INSTALL_LIBRARY(mod_magnet "mod_magnet.c;mod_magnet_cache.c")
1931 +ADD_AND_INSTALL_LIBRARY(mod_mysql_vhost mod_mysql_vhost.c)
1932 +ADD_AND_INSTALL_LIBRARY(mod_proxy mod_proxy.c)
1933 +ADD_AND_INSTALL_LIBRARY(mod_redirect mod_redirect.c)
1934 +ADD_AND_INSTALL_LIBRARY(mod_rewrite mod_rewrite.c)
1935 +ADD_AND_INSTALL_LIBRARY(mod_rrdtool mod_rrdtool.c)
1936 +ADD_AND_INSTALL_LIBRARY(mod_scgi mod_scgi.c)
1937 +ADD_AND_INSTALL_LIBRARY(mod_secdownload mod_secure_download.c)
1938 +ADD_AND_INSTALL_LIBRARY(mod_setenv mod_setenv.c)
1939 +ADD_AND_INSTALL_LIBRARY(mod_simple_vhost mod_simple_vhost.c)
1940 +ADD_AND_INSTALL_LIBRARY(mod_ssi "mod_ssi_exprparser.c;mod_ssi_expr.c;mod_ssi.c")
1941 +ADD_AND_INSTALL_LIBRARY(mod_staticfile mod_staticfile.c)
1942 +ADD_AND_INSTALL_LIBRARY(mod_status mod_status.c)
1943 +ADD_AND_INSTALL_LIBRARY(mod_trigger_b4_dl mod_trigger_b4_dl.c)
1944 +ADD_AND_INSTALL_LIBRARY(mod_uploadprogress mod_uploadprogress.c)
1945 +ADD_AND_INSTALL_LIBRARY(mod_userdir mod_userdir.c)
1946 +ADD_AND_INSTALL_LIBRARY(mod_usertrack mod_usertrack.c)
1947 +ADD_AND_INSTALL_LIBRARY(mod_webdav mod_webdav.c)
1950 + ADD_TARGET_PROPERTIES(lighttpd LINK_FLAGS ${PCRE_LDFLAGS})
1951 + ADD_TARGET_PROPERTIES(lighttpd COMPILE_FLAGS ${PCRE_CFLAGS})
1952 + ADD_TARGET_PROPERTIES(mod_rewrite LINK_FLAGS ${PCRE_LDFLAGS})
1953 + ADD_TARGET_PROPERTIES(mod_rewrite COMPILE_FLAGS ${PCRE_CFLAGS})
1954 + ADD_TARGET_PROPERTIES(mod_dirlisting LINK_FLAGS ${PCRE_LDFLAGS})
1955 + ADD_TARGET_PROPERTIES(mod_dirlisting COMPILE_FLAGS ${PCRE_CFLAGS})
1956 + ADD_TARGET_PROPERTIES(mod_redirect LINK_FLAGS ${PCRE_LDFLAGS})
1957 + ADD_TARGET_PROPERTIES(mod_redirect COMPILE_FLAGS ${PCRE_CFLAGS})
1958 + ADD_TARGET_PROPERTIES(mod_ssi LINK_FLAGS ${PCRE_LDFLAGS})
1959 + ADD_TARGET_PROPERTIES(mod_ssi COMPILE_FLAGS ${PCRE_CFLAGS})
1960 + ADD_TARGET_PROPERTIES(mod_trigger_b4_dl LINK_FLAGS ${PCRE_LDFLAGS})
1961 + ADD_TARGET_PROPERTIES(mod_trigger_b4_dl COMPILE_FLAGS ${PCRE_CFLAGS})
1964 +ADD_TARGET_PROPERTIES(mod_magnet LINK_FLAGS ${LUA_LDFLAGS})
1965 +ADD_TARGET_PROPERTIES(mod_magnet COMPILE_FLAGS ${LUA_CFLAGS})
1967 +ADD_TARGET_PROPERTIES(mod_cml LINK_FLAGS ${LUA_LDFLAGS})
1968 +ADD_TARGET_PROPERTIES(mod_cml COMPILE_FLAGS ${LUA_CFLAGS})
1970 +IF(HAVE_MYSQL_H AND HAVE_LIBMYSQL)
1971 + TARGET_LINK_LIBRARIES(mod_mysql_vhost mysqlclient)
1972 + INCLUDE_DIRECTORIES(/usr/include/mysql)
1973 +ENDIF(HAVE_MYSQL_H AND HAVE_LIBMYSQL)
1977 + SET(L_MOD_WEBDAV ${L_MOD_WEBDAV} sqlite3)
1978 +ENDIF(HAVE_SQLITE3_H)
1980 + SET_TARGET_PROPERTIES(mod_webdav PROPERTIES LINK_FLAGS ${XML2_LDFLAGS})
1981 +ENDIF(HAVE_LIBXML_H)
1984 + SET(L_MOD_WEBDAV ${L_MOD_WEBDAV} uuid)
1985 + ENDIF(NEED_LIBUUID)
1988 +TARGET_LINK_LIBRARIES(mod_webdav ${L_MOD_WEBDAV})
1992 + SET(L_MOD_AUTH ${L_MOD_AUTH} crypt)
1993 +ENDIF(HAVE_LIBCRYPT)
1996 + SET(L_MOD_AUTH ${L_MOD_AUTH} ldap lber)
1998 +TARGET_LINK_LIBRARIES(mod_auth ${L_MOD_AUTH})
2002 + TARGET_LINK_LIBRARIES(mod_compress ${ZLIB_LIBRARY} bz2)
2003 + ELSE(HAVE_BZLIB_H)
2004 + TARGET_LINK_LIBRARIES(mod_compress ${ZLIB_LIBRARY})
2005 + ENDIF(HAVE_BZLIB_H)
2009 + TARGET_LINK_LIBRARIES(lighttpd fam)
2013 + TARGET_LINK_LIBRARIES(mod_trigger_b4_dl gdbm)
2016 +IF(HAVE_MEMCACHE_H)
2017 + TARGET_LINK_LIBRARIES(mod_trigger_b4_dl memcache)
2018 +ENDIF(HAVE_MEMCACHE_H)
2020 +IF(CMAKE_COMPILER_IS_GNUCC)
2021 + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -Wall -g -Wshadow -W -pedantic")
2022 + SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O2")
2023 + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0")
2024 + SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_WITHDEBINFO} -O2")
2025 + ADD_DEFINITIONS(-D_GNU_SOURCE)
2026 +ENDIF(CMAKE_COMPILER_IS_GNUCC)
2028 +SET_TARGET_PROPERTIES(lighttpd PROPERTIES CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
2031 + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNVALGRIND")
2032 + ADD_TARGET_PROPERTIES(lighttpd COMPILE_FLAGS "-DLI_DECLARE_EXPORTS")
2033 + TARGET_LINK_LIBRARIES(lighttpd ws2_32)
2034 + TARGET_LINK_LIBRARIES(mod_proxy ws2_32)
2035 + TARGET_LINK_LIBRARIES(mod_fcgi ws2_32)
2036 + TARGET_LINK_LIBRARIES(mod_scgi ws2_32)
2037 + TARGET_LINK_LIBRARIES(mod_ssi ws2_32)
2040 + TARGET_LINK_LIBRARIES(lighttpd msvcr70)
2041 + ADD_TARGET_PROPERTIES(lighttpd LINK_FLAGS "-Wl,-subsystem,console")
2045 +IF(NOT BUILD_STATIC)
2047 + TARGET_LINK_LIBRARIES(lighttpd dl)
2049 +ENDIF(NOT BUILD_STATIC)
2051 +IF(HAVE_LIBSSL AND HAVE_LIBCRYPTO)
2052 + TARGET_LINK_LIBRARIES(lighttpd ssl)
2053 + TARGET_LINK_LIBRARIES(lighttpd crypto)
2054 +ENDIF(HAVE_LIBSSL AND HAVE_LIBCRYPTO)
2057 +INSTALL(TARGETS ${L_INSTALL_TARGETS}
2058 + RUNTIME DESTINATION ${SBINDIR}
2059 + LIBRARY DESTINATION ${LIGHTTPD_MODULES_DIR}
2060 + ARCHIVE DESTINATION ${LIGHTTPD_MODULES_DIR}/static)
2062 +## HACK to make win32 to install our libraries in desired directory..
2063 +INSTALL(TARGETS lighttpd
2064 + RUNTIME DESTINATION ${SBINDIR}
2065 + ARCHIVE DESTINATION lib/static)
2066 +LIST(REMOVE_ITEM L_INSTALL_TARGETS lighttpd)
2067 +INSTALL(TARGETS ${L_INSTALL_TARGETS}
2068 + RUNTIME DESTINATION ${SBINDIR}/lib
2069 + LIBRARY DESTINATION lib
2070 + ARCHIVE DESTINATION lib/static)
2072 Index: src/mod_accesslog.c
2073 ===================================================================
2074 --- src/mod_accesslog.c (.../tags/lighttpd-1.4.20) (revision 2392)
2075 +++ src/mod_accesslog.c (.../branches/lighttpd-1.4.x) (revision 2392)
2076 @@ -169,13 +169,13 @@
2077 if (fields->size == 0) {
2080 - fields->ptr = malloc(fields->size * sizeof(format_fields * ));
2081 + fields->ptr = malloc(fields->size * sizeof(format_field * ));
2082 } else if (fields->used == fields->size) {
2084 - fields->ptr = realloc(fields->ptr, fields->size * sizeof(format_fields * ));
2085 + fields->ptr = realloc(fields->ptr, fields->size * sizeof(format_field * ));
2088 - fields->ptr[fields->used] = malloc(sizeof(format_fields));
2089 + fields->ptr[fields->used] = malloc(sizeof(format_field));
2090 fields->ptr[fields->used]->type = FIELD_STRING;
2091 fields->ptr[fields->used]->string = buffer_init();
2093 @@ -189,10 +189,10 @@
2094 if (fields->size == 0) {
2097 - fields->ptr = malloc(fields->size * sizeof(format_fields * ));
2098 + fields->ptr = malloc(fields->size * sizeof(format_field * ));
2099 } else if (fields->used == fields->size) {
2101 - fields->ptr = realloc(fields->ptr, fields->size * sizeof(format_fields * ));
2102 + fields->ptr = realloc(fields->ptr, fields->size * sizeof(format_field * ));
2105 /* search for the terminating command */
2110 - fields->ptr[fields->used] = malloc(sizeof(format_fields));
2111 + fields->ptr[fields->used] = malloc(sizeof(format_field));
2112 fields->ptr[fields->used]->type = FIELD_FORMAT;
2113 fields->ptr[fields->used]->field = fmap[j].type;
2114 fields->ptr[fields->used]->string = NULL;
2119 - fields->ptr[fields->used] = malloc(sizeof(format_fields));
2120 + fields->ptr[fields->used] = malloc(sizeof(format_field));
2121 fields->ptr[fields->used]->type = FIELD_FORMAT;
2122 fields->ptr[fields->used]->field = fmap[j].type;
2123 fields->ptr[fields->used]->string = buffer_init();
2128 - fields->ptr[fields->used] = malloc(sizeof(format_fields));
2129 + fields->ptr[fields->used] = malloc(sizeof(format_field));
2130 fields->ptr[fields->used]->type = FIELD_FORMAT;
2131 fields->ptr[fields->used]->field = fmap[j].type;
2132 fields->ptr[fields->used]->string = NULL;
2133 @@ -321,13 +321,13 @@
2134 if (fields->size == 0) {
2137 - fields->ptr = malloc(fields->size * sizeof(format_fields * ));
2138 + fields->ptr = malloc(fields->size * sizeof(format_field * ));
2139 } else if (fields->used == fields->size) {
2141 - fields->ptr = realloc(fields->ptr, fields->size * sizeof(format_fields * ));
2142 + fields->ptr = realloc(fields->ptr, fields->size * sizeof(format_field * ));
2145 - fields->ptr[fields->used] = malloc(sizeof(format_fields));
2146 + fields->ptr[fields->used] = malloc(sizeof(format_field));
2147 fields->ptr[fields->used]->type = FIELD_STRING;
2148 fields->ptr[fields->used]->string = buffer_init();
2152 return HANDLER_ERROR;
2155 fcntl(s->log_access_fd, F_SETFD, FD_CLOEXEC);
2160 return HANDLER_GO_ON;
2163 return HANDLER_ERROR;
2166 + fcntl(s->log_access_fd, F_SETFD, FD_CLOEXEC);
2171 Index: src/fdevent_linux_sysepoll.c
2172 ===================================================================
2173 --- src/fdevent_linux_sysepoll.c (.../tags/lighttpd-1.4.20) (revision 2392)
2174 +++ src/fdevent_linux_sysepoll.c (.../branches/lighttpd-1.4.x) (revision 2392)
2176 if (e & EPOLLHUP) events |= FDEVENT_HUP;
2177 if (e & EPOLLPRI) events |= FDEVENT_PRI;
2183 static int fdevent_linux_sysepoll_event_get_fd(fdevents *ev, size_t ndx) {
2185 ===================================================================
2186 --- src/server.c (.../tags/lighttpd-1.4.20) (revision 2392)
2187 +++ src/server.c (.../branches/lighttpd-1.4.x) (revision 2392)
2189 srv->srvconf.modules_dir = buffer_init_string(LIBRARY_DIR);
2190 srv->srvconf.network_backend = buffer_init();
2191 srv->srvconf.upload_tempdirs = array_init();
2192 + srv->srvconf.reject_expect_100_with_417 = 1;
2195 srv->errorlog_fd = -1;
2196 @@ -844,15 +845,16 @@
2200 - if (srv->srvconf.max_conns > srv->max_fds) {
2201 - /* we can't have more connections than max-fds */
2202 - srv->max_conns = srv->max_fds;
2203 + if (srv->srvconf.max_conns > srv->max_fds/2) {
2204 + /* we can't have more connections than max-fds/2 */
2205 + log_error_write(srv, __FILE__, __LINE__, "sdd", "can't have more connections than fds/2: ", srv->srvconf.max_conns, srv->max_fds);
2206 + srv->max_conns = srv->max_fds/2;
2207 } else if (srv->srvconf.max_conns) {
2208 /* otherwise respect the wishes of the user */
2209 srv->max_conns = srv->srvconf.max_conns;
2211 - /* or use the default */
2212 - srv->max_conns = srv->max_fds;
2213 + /* or use the default: we really don't want to hit max-fds */
2214 + srv->max_conns = srv->max_fds/3;
2217 if (HANDLER_GO_ON != plugins_call_init(srv)) {
2218 @@ -1243,8 +1245,8 @@
2220 if (srv->cur_ts - con->write_request_ts > con->conf.max_write_idle) {
2223 - log_error_write(srv, __FILE__, __LINE__, "sbsosds",
2224 + if (con->conf.log_timeouts) {
2225 + log_error_write(srv, __FILE__, __LINE__, "sbsosds",
2226 "NOTE: a request for",
2228 "timed out after writing",
2229 @@ -1252,7 +1254,7 @@
2231 (int)con->conf.max_write_idle,
2232 "seconds. If this a problem increase server.max-write-idle");
2235 connection_set_state(srv, con, CON_STATE_ERROR);
2238 @@ -1295,8 +1297,8 @@
2239 if (srv->sockets_disabled) {
2240 /* our server sockets are disabled, why ? */
2242 - if ((srv->cur_fds + srv->want_fds < srv->max_fds * 0.8) && /* we have enough unused fds */
2243 - (srv->conns->used < srv->max_conns * 0.9) &&
2244 + if ((srv->cur_fds + srv->want_fds < srv->max_fds * 8 / 10) && /* we have enough unused fds */
2245 + (srv->conns->used <= srv->max_conns * 9 / 10) &&
2246 (0 == graceful_shutdown)) {
2247 for (i = 0; i < srv->srv_sockets.used; i++) {
2248 server_socket *srv_socket = srv->srv_sockets.ptr[i];
2249 @@ -1308,8 +1310,8 @@
2250 srv->sockets_disabled = 0;
2253 - if ((srv->cur_fds + srv->want_fds > srv->max_fds * 0.9) || /* out of fds */
2254 - (srv->conns->used > srv->max_conns) || /* out of connections */
2255 + if ((srv->cur_fds + srv->want_fds > srv->max_fds * 9 / 10) || /* out of fds */
2256 + (srv->conns->used >= srv->max_conns) || /* out of connections */
2257 (graceful_shutdown)) { /* graceful_shutdown */
2259 /* disable server-fds */
2260 @@ -1348,7 +1350,7 @@
2262 if (graceful_shutdown) {
2263 log_error_write(srv, __FILE__, __LINE__, "s", "[note] graceful shutdown started");
2264 - } else if (srv->conns->used > srv->max_conns) {
2265 + } else if (srv->conns->used >= srv->max_conns) {
2266 log_error_write(srv, __FILE__, __LINE__, "s", "[note] sockets disabled, connection limit reached");
2268 log_error_write(srv, __FILE__, __LINE__, "s", "[note] sockets disabled, out-of-fds");
2270 ===================================================================
2271 --- src/log.c (.../tags/lighttpd-1.4.20) (revision 2392)
2272 +++ src/log.c (.../branches/lighttpd-1.4.x) (revision 2392)
2273 @@ -146,6 +146,10 @@
2274 /* ok, new log is open, close the old one */
2275 close(srv->errorlog_fd);
2276 srv->errorlog_fd = new_fd;
2278 + /* close fd on exec (cgi) */
2279 + fcntl(srv->errorlog_fd, F_SETFD, FD_CLOEXEC);
2284 Index: src/proc_open.c
2285 ===================================================================
2286 --- src/proc_open.c (.../tags/lighttpd-1.4.20) (revision 2392)
2287 +++ src/proc_open.c (.../branches/lighttpd-1.4.x) (revision 2392)
2288 @@ -287,32 +287,33 @@
2291 /* {{{ proc_open_buffer */
2292 -int proc_open_buffer(proc_handler_t *proc, const char *command, buffer *in, buffer *out, buffer *err) {
2293 +int proc_open_buffer(const char *command, buffer *in, buffer *out, buffer *err) {
2294 + proc_handler_t proc;
2298 - if (proc_open(proc, command) != 0) {
2299 + if (proc_open(&proc, command) != 0) {
2304 - if (write(proc->in.fd, (void *)in->ptr, in->used) < 0) {
2305 + if (write(proc.in.fd, (void *)in->ptr, in->used) < 0) {
2306 perror("error writing pipe");
2310 - pipe_close(&proc->in);
2311 + pipe_close(&proc.in);
2314 - proc_read_fd_to_buffer(proc->out.fd, out);
2315 + proc_read_fd_to_buffer(proc.out.fd, out);
2317 - pipe_close(&proc->out);
2318 + pipe_close(&proc.out);
2321 - proc_read_fd_to_buffer(proc->err.fd, err);
2322 + proc_read_fd_to_buffer(proc.err.fd, err);
2324 - pipe_close(&proc->err);
2325 + pipe_close(&proc.err);
2327 + proc_close(&proc);
2335 fprintf(stdout, "test: echo 321 with read\n"); fflush(stdout);
2336 - if (proc_open_buffer(&proc, "echo 321", NULL, out, err) != 0) {
2337 + if (proc_open_buffer("echo 321", NULL, out, err) != 0) {
2340 fprintf(stdout, "result: ->%s<-\n\n", out->ptr); fflush(stdout);
2343 fprintf(stdout, "test: echo 123 | " CMD_CAT "\n"); fflush(stdout);
2344 buffer_copy_string_len(in, CONST_STR_LEN("123\n"));
2345 - if (proc_open_buffer(&proc, CMD_CAT, in, out, err) != 0) {
2346 + if (proc_open_buffer(CMD_CAT, in, out, err) != 0) {
2349 fprintf(stdout, "result: ->%s<-\n\n", out->ptr); fflush(stdout);
2350 Index: src/proc_open.h
2351 ===================================================================
2352 --- src/proc_open.h (.../tags/lighttpd-1.4.20) (revision 2392)
2353 +++ src/proc_open.h (.../branches/lighttpd-1.4.x) (revision 2392)
2356 int proc_close(proc_handler_t *ht);
2357 int proc_open(proc_handler_t *ht, const char *command);
2358 -int proc_open_buffer(proc_handler_t *ht, const char *command, buffer *in, buffer *out, buffer *err);
2359 +int proc_open_buffer(const char *command, buffer *in, buffer *out, buffer *err);
2360 Index: tests/mod-proxy.t
2361 ===================================================================
2362 --- tests/mod-proxy.t (.../tags/lighttpd-1.4.20) (revision 2392)
2363 +++ tests/mod-proxy.t (.../branches/lighttpd-1.4.x) (revision 2392)
2368 -use Test::More tests => 6;
2369 +use Test::More tests => 9;
2372 my $tf_real = LightyTest->new();
2373 my $tf_proxy = LightyTest->new();
2376 +my $php_child = -1;
2378 +my $phpbin = (defined $ENV{'PHP'} ? $ENV{'PHP'} : '/usr/bin/php-cgi');
2379 +$ENV{'PHP'} = $phpbin;
2382 + skip "PHP already running on port 1026", 1 if $tf_real->listening_on(1026);
2383 + skip "no php binary found", 1 unless -x $phpbin;
2384 + ok(-1 != ($php_child = $tf_real->spawnfcgi($phpbin, 1026)), "Spawning php");
2387 ## we need two procs
2388 ## 1. the real webserver
2389 ## 2. the proxy server
2391 $tf_proxy->{PORT} = 2050;
2392 $tf_proxy->{CONFIGFILE} = 'proxy.conf';
2394 -ok($tf_real->start_proc == 0, "Starting lighttpd") or die();
2395 +ok($tf_real->start_proc == 0, "Starting lighttpd") or goto cleanup;
2397 -ok($tf_proxy->start_proc == 0, "Starting lighttpd as proxy") or die();
2398 +ok($tf_proxy->start_proc == 0, "Starting lighttpd as proxy") or goto cleanup;
2400 $t->{REQUEST} = ( <<EOF
2401 GET /index.html HTTP/1.0
2403 $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'Server' => 'Apache 1.3.29' } ];
2404 ok($tf_proxy->handle_http($t) == 0, 'drop Server from real server');
2407 + skip "no PHP running on port 1026", 1 unless $tf_real->listening_on(1026);
2408 + $t->{REQUEST} = ( <<EOF
2409 +GET /rewrite/all/some+test%3axxx%20with%20space HTTP/1.0
2410 +Host: www.example.org
2413 + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => '/some+test%3axxx%20with%20space' } ];
2414 + ok($tf_proxy->handle_http($t) == 0, 'rewrited urls work with encoded path');
2417 ok($tf_proxy->stop_proc == 0, "Stopping lighttpd proxy");
2419 ok($tf_real->stop_proc == 0, "Stopping lighttpd");
2422 + skip "PHP not started, cannot stop it", 1 unless $php_child != -1;
2423 + ok(0 == $tf_real->endspawnfcgi($php_child), "Stopping php");
2431 +$tf_real->endspawnfcgi($php_child) if $php_child != -1;
2434 Index: tests/CMakeLists.txt
2435 ===================================================================
2436 --- tests/CMakeLists.txt (.../tags/lighttpd-1.4.20) (revision 0)
2437 +++ tests/CMakeLists.txt (.../branches/lighttpd-1.4.x) (revision 2392)
2442 + core-404-handler.t
2448 + core-var-include.t
2467 +FOREACH(it ${T_FILES})
2468 + ADD_TEST(${it} "${lighttpd_SOURCE_DIR}/tests/wrapper.sh"
2469 + "${lighttpd_SOURCE_DIR}/tests"
2470 + "${lighttpd_BINARY_DIR}"
2471 + "${lighttpd_SOURCE_DIR}/tests/${it}")
2473 Index: tests/SConscript
2474 ===================================================================
2475 --- tests/SConscript (.../tags/lighttpd-1.4.20) (revision 2392)
2476 +++ tests/SConscript (.../branches/lighttpd-1.4.x) (revision 2392)
2481 + mod-compress.conf \
2485 Index: tests/mod-compress.conf
2486 ===================================================================
2487 --- tests/mod-compress.conf (.../tags/lighttpd-1.4.20) (revision 0)
2488 +++ tests/mod-compress.conf (.../branches/lighttpd-1.4.x) (revision 2392)
2490 +debug.log-request-handling = "enable"
2491 +debug.log-response-header = "disable"
2492 +debug.log-request-header = "disable"
2494 +server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
2495 +server.pid-file = env.SRCDIR + "/tmp/lighttpd/lighttpd.pid"
2497 +## bind to port (default: 80)
2500 +## bind to localhost (default: all interfaces)
2501 +server.bind = "localhost"
2502 +server.errorlog = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.error.log"
2503 +server.name = "www.example.org"
2509 +######################## MODULE CONFIG ############################
2511 +mimetype.assign = (
2512 + ".html" => "text/html",
2513 + ".txt" => "text/plain",
2516 +$HTTP["host"] == "cache.example.org" {
2517 + compress.cache-dir = env.SRCDIR + "/tmp/lighttpd/cache/compress/"
2519 +compress.filetype = ("text/plain", "text/html")
2521 +compress.allowed-encodings = ( "gzip", "deflate" )
2522 Index: tests/mod-fastcgi.t
2523 ===================================================================
2524 --- tests/mod-fastcgi.t (.../tags/lighttpd-1.4.20) (revision 2392)
2525 +++ tests/mod-fastcgi.t (.../branches/lighttpd-1.4.x) (revision 2392)
2530 -use Test::More tests => 49;
2531 +use Test::More tests => 50;
2534 my $tf = LightyTest->new();
2539 - skip "no fcgi-auth found", 4 unless -x $tf->{BASEDIR}."/tests/fcgi-auth" || -x $tf->{BASEDIR}."/tests/fcgi-auth.exe";
2540 + skip "no fcgi-auth found", 5 unless -x $tf->{BASEDIR}."/tests/fcgi-auth" || -x $tf->{BASEDIR}."/tests/fcgi-auth.exe";
2542 $tf->{CONFIGFILE} = 'fastcgi-auth.conf';
2543 ok($tf->start_proc == 0, "Starting lighttpd with $tf->{CONFIGFILE}") or die();
2544 @@ -235,6 +235,14 @@
2545 $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 403 } ];
2546 ok($tf->handle_http($t) == 0, 'FastCGI - Auth');
2548 + $t->{REQUEST} = ( <<EOF
2549 +GET /expire/access.txt?ok HTTP/1.0
2550 +Host: www.example.org
2553 + $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
2554 + ok($tf->handle_http($t) == 0, 'FastCGI - Auth in subdirectory');
2556 ok($tf->stop_proc == 0, "Stopping lighttpd");
2559 Index: tests/mod-rewrite.t
2560 ===================================================================
2561 --- tests/mod-rewrite.t (.../tags/lighttpd-1.4.20) (revision 2392)
2562 +++ tests/mod-rewrite.t (.../branches/lighttpd-1.4.x) (revision 2392)
2567 -use Test::More tests => 8;
2568 +use Test::More tests => 7;
2571 my $tf = LightyTest->new();
2574 $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => '' } ];
2575 ok($tf->handle_http($t) == 0, 'valid request');
2578 $t->{REQUEST} = ( <<EOF
2579 GET /rewrite/foo?a=b HTTP/1.0
2580 Host: www.example.org
2582 $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'bar&a=b' } ];
2583 ok($tf->handle_http($t) == 0, 'valid request');
2585 - $t->{REQUEST} = ( <<EOF
2586 -GET %2Frewrite/f%6Fo?a=b HTTP/1.0
2587 -Host: www.example.org
2590 - $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'a=b' } ];
2591 - ok($tf->handle_http($t) == 0, 'valid request with url encoded characters');
2593 ok($tf->stop_proc == 0, "Stopping lighttpd");
2596 Index: tests/lighttpd.conf
2597 ===================================================================
2598 --- tests/lighttpd.conf (.../tags/lighttpd-1.4.20) (revision 2392)
2599 +++ tests/lighttpd.conf (.../branches/lighttpd-1.4.x) (revision 2392)
2602 $HTTP["host"] == "etag.example.org" {
2603 static-file.etags = "disable"
2604 + compress.filetype = ()
2606 Index: tests/fastcgi-auth.conf
2607 ===================================================================
2608 --- tests/fastcgi-auth.conf (.../tags/lighttpd-1.4.20) (revision 2392)
2609 +++ tests/fastcgi-auth.conf (.../branches/lighttpd-1.4.x) (revision 2392)
2611 "bin-path" => env.SRCDIR + "/fcgi-auth",
2612 "mode" => "authorizer",
2613 "docroot" => env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/",
2614 + "check-local" => "disable",
2618 Index: tests/proxy.conf
2619 ===================================================================
2620 --- tests/proxy.conf (.../tags/lighttpd-1.4.20) (revision 2392)
2621 +++ tests/proxy.conf (.../branches/lighttpd-1.4.x) (revision 2392)
2623 url.redirect = ( "^/redirect/$" => "http://localhost:2048/" )
2625 url.rewrite = ( "^/rewrite/foo($|\?.+)" => "/indexfile/rewrite.php$1",
2626 - "^/rewrite/bar(?:$|\?(.+))" => "/indexfile/rewrite.php?bar&$1" )
2627 + "^/rewrite/bar(?:$|\?(.+))" => "/indexfile/rewrite.php?bar&$1",
2628 + "^/rewrite/all(/.*)$" => "/indexfile/rewrite.php?$1" )
2630 expire.url = ( "/expire/access" => "access 2 hours",
2631 "/expire/modification" => "access plus 1 seconds 2 minutes")
2632 Index: tests/Makefile.am
2633 ===================================================================
2634 --- tests/Makefile.am (.../tags/lighttpd-1.4.20) (revision 2392)
2635 +++ tests/Makefile.am (.../branches/lighttpd-1.4.x) (revision 2392)
2640 + mod-compress.conf \
2644 Index: tests/mod-compress.t
2645 ===================================================================
2646 --- tests/mod-compress.t (.../tags/lighttpd-1.4.20) (revision 2392)
2647 +++ tests/mod-compress.t (.../branches/lighttpd-1.4.x) (revision 2392)
2652 -use Test::More tests => 10;
2653 +use Test::More tests => 11;
2656 my $tf = LightyTest->new();
2659 +$tf->{CONFIGFILE} = 'mod-compress.conf';
2661 ok($tf->start_proc == 0, "Starting lighttpd") or die();
2663 $t->{REQUEST} = ( <<EOF
2665 $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, '+Vary' => '', 'Content-Type' => "text/plain" } ];
2666 ok($tf->handle_http($t) == 0, 'Empty Accept-Encoding');
2668 +$t->{REQUEST} = ( <<EOF
2669 +GET /index.txt HTTP/1.0
2670 +Accept-Encoding: bzip2, gzip, deflate
2671 +Host: cache.example.org
2674 +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, '+Vary' => '', 'Content-Encoding' => 'gzip', 'Content-Type' => "text/plain" } ];
2675 +ok($tf->handle_http($t) == 0, 'bzip2 requested but disabled');
2678 ok($tf->stop_proc == 0, "Stopping lighttpd");
2679 Index: doc/redirect.txt
2680 ===================================================================
2681 --- doc/redirect.txt (.../tags/lighttpd-1.4.20) (revision 2392)
2682 +++ doc/redirect.txt (.../branches/lighttpd-1.4.x) (revision 2392)
2684 $HTTP["host"] =~ "^www\.(.*)" {
2685 url.redirect = ( "^/(.*)" => "http://%1/$1" )
2691 +Do NOT use mod_redirect to protect specific urls, as the original url passed from the client
2692 +is matched against your rules, for example strings like "/abc/../xyz%2f/path".
2693 Index: doc/compress.txt
2694 ===================================================================
2695 --- doc/compress.txt (.../tags/lighttpd-1.4.20) (revision 2392)
2696 +++ doc/compress.txt (.../branches/lighttpd-1.4.x) (revision 2392)
2698 Module: mod_compress
2699 --------------------
2701 -:Author: Jan Kneschke
2703 -:Revision: $Revision$
2706 - a nice, short abstrace about the module
2709 :keywords: lighttpd, compress
2714 Output compression reduces the network load and can improve the overall
2715 -throughput of the webserver.
2716 +throughput of the webserver. All major http-clients support compression by
2717 +announcing it in the Accept-Encoding header. This is used to negotiate the
2718 +most suitable compression method. We support deflate, gzip and bzip2.
2720 -Only static content is supported up to now.
2721 +deflate (RFC1950, RFC1951) and gzip (RFC1952) depend on zlib while bzip2
2722 +depends on libbzip2. bzip2 is only supported by lynx and some other console
2725 -The server negotiates automaticly which compression method is used.
2726 -Supported are gzip, deflate, bzip.
2727 +We currently limit to compression support to static files.
2732 +mod_compress can store compressed files on disk to optimize the compression
2733 +on a second request away. As soon as compress.cache-dir is set the files are
2736 +(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.)
2738 +The names of the cache files are made of the filename, the compression method
2739 +and the etag associated to the file.
2741 +Cleaning the cache is left to the user. A cron job deleting files older than
2742 +10 days could do it: ::
2744 + find /var/www/cache -type f -mtime +10 | xargs -r rm
2749 +The module limits the compression of files to files smaller than 128 MByte and
2750 +larger than 128 Byte.
2752 +The lower limit is set as small files tend to become larger by compressing due
2753 +to the compression headers, the upper limit is set to work sensibly with
2754 +memory and cpu-time.
2756 +Directories containing a tilde ('~') are not created automatically (See ticket
2757 +#113). To enable compression for user dirs you have to create the directories
2758 +by hand in the cache directory.
2763 +compress.allowed-encodings
2764 + override default set of allowed encodings
2768 + compress.allowed-encodings = ("bzip2", "gzip", "deflate")
2771 name of the directory where compressed content will be cached
2773 @@ -47,20 +82,111 @@
2774 Default: not set, compress the file for every request
2777 - mimetypes where might get compressed
2778 + mimetypes which might get compressed
2782 compress.filetype = ("text/plain", "text/html")
2784 + Keep in mind that compressed JavaScript and CSS files are broken in some
2785 + browsers. Not setting any filetypes will result in no files being compressed.
2787 + 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".
2791 +compress.max-filesize
2792 + maximum size of the original file to be compressed kBytes.
2794 + This is meant to protect the server against DoSing as compressing large
2795 + (let's say 1Gbyte) takes a lot of time and would delay the whole operation
2798 + There is a hard upper limit of 128Mbyte.
2800 + Default: unlimited (== hard-limit of 128MByte)
2802 +Display compressed files
2803 +========================
2805 +If you enable mod_compress, and you want to force clients to uncompress and display compressed text files, please force mimetype to nothing.
2807 +If you want to add headers for uncompress and display diff.gz files , add this section in your conf : ::
2809 + $HTTP["url"] =~ "\.diff\.gz" {
2810 + setenv.add-response-header = ( "Content-Encoding" => "gzip" )
2811 + mimetype.assign = ()
2815 Compressing Dynamic Content
2816 ===========================
2821 To compress dynamic content with PHP please enable ::
2823 zlib.output_compression = 1
2824 + zlib.output_handler = On
2826 in the php.ini as PHP provides compression support by itself.
2828 +mod_compress of lighttpd 1.5 r1992 may not set correct Content-Encoding with php-fcgi. A solution to that problem would be:
2830 +1.disable mod_compress when request a php file::
2832 + $HTTP["url"] !~ "\.php$" {
2833 + compress.filetype = ("text/plain", "text/html", "text/javascript", "text/css", "text/xml")
2836 +2.enable mod_setenv of your lighttpd::
2838 + server.modules += ( "mod_setenv" )
2840 +3.manually set Content-Encoding::
2842 + $HTTP["url"] =~ "\.php$" {
2843 + setenv.add-response-header = ( "Content-Encoding" => "gzip")
2850 +To compress dynamic content with TurboGears please enable ::
2853 + gzip_filter.on = True
2854 + gzip_filter.mime_types = ["application/x-javascript", "text/javascript", "text/html", "text/css", "text/plain"]
2856 +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.
2861 +To compress dynamic content with Django please enable the GZipMiddleware ::
2863 + MIDDLEWARE_CLASSES = (
2864 + 'django.middleware.gzip.GZipMiddleware',
2868 +in the settings.py file in your Django project.
2873 +To compress dynamic content with Perl/Catalyst, simply use the Catalyst::Plugin::Compress::Gzip module available on CPAN ::
2880 +in your main package (MyApp.pm). Further configuration is not required.
2886 Index: doc/configuration.txt
2887 ===================================================================
2888 --- doc/configuration.txt (.../tags/lighttpd-1.4.20) (revision 2392)
2889 +++ doc/configuration.txt (.../branches/lighttpd-1.4.x) (revision 2392)
2894 +$HTTP["user-agent"]
2899 + math on the http method
2902 +$HTTP["query-string"]
2903 + match on the (not decoded) query-string
2906 match on the remote IP or a remote Network
2908 + match on the Accept-Language header
2910 match on socket. Value must be on the format "ip:port" where ip is an IP
2911 address and port a port number. Only equal match (==) is supported.
2912 Index: doc/rewrite.txt
2913 ===================================================================
2914 --- doc/rewrite.txt (.../tags/lighttpd-1.4.20) (revision 2392)
2915 +++ doc/rewrite.txt (.../branches/lighttpd-1.4.x) (revision 2392)
2917 The options ``url.rewrite`` and ``url.rewrite-final`` were mapped to ``url.rewrite-once``
2923 +Do NOT use mod_rewrite to protect specific urls, as the original url passed from the client
2924 +is matched against your rules, for example strings like "/abc/../xyz%2f/path".
2930 ===================================================================
2931 --- SConstruct (.../tags/lighttpd-1.4.20) (revision 2392)
2932 +++ SConstruct (.../branches/lighttpd-1.4.x) (revision 2392)
2936 package = 'lighttpd'
2940 def checkCHeaders(autoconf, hdrs):
2941 p = re.compile('[^A-Z0-9]')
2943 ===================================================================
2944 --- Makefile.am (.../tags/lighttpd-1.4.20) (revision 2392)
2945 +++ Makefile.am (.../branches/lighttpd-1.4.x) (revision 2392)
2947 -SUBDIRS=src doc tests cygwin openwrt
2948 +SUBDIRS=src doc tests
2950 EXTRA_DIST=autogen.sh SConstruct
2953 ===================================================================
2954 --- NEWS (.../tags/lighttpd-1.4.20) (revision 2392)
2955 +++ NEWS (.../branches/lighttpd-1.4.x) (revision 2392)
2963 + * Fix base64 decoding in mod_auth (#1757, thx guido)
2964 + * Fix mod_cgi segfault when bound to unix domain socket (#653)
2965 + * Do not rely on ioctl FIONREAD (#673)
2966 + * Now really fix mod auth ldap (#1066)
2967 + * Fix leaving zombie process with include_shell (#1777)
2968 + * Removed debian/, openwrt/ and cygwin/; they weren't kept up-to-date, and we decided to remove dist. specific stuff
2969 + * Try to convert string options to shorts for numeric options in config file; allows to use env-vars for numeric options. (#1159, thx andrewb)
2970 + * Do not cache default vhost in mod_simple_vhost (#709)
2971 + * Trust pcre-config, do not check for pcre manually (#1769)
2972 + * Fix fastcgi authorization in subdirectories with check-local=disabled; don't split pathinfo for authorizer. (#963)
2973 + * Add possibility to disable methods in mod_compress (#1773)
2974 + * Fix duplicate connection keep-alive/transfer-encoding headers (#960)
2975 + * Fixed fix for round-robin in mod_proxy (forgot to increment the index) (#1715)
2976 + * Fix fastcgi-authorizer handling; Status: 200 is now accepted as the doc requests
2977 + * Compare address family in inet_ntop_cache
2978 + * Revert CVE-2008-4359 (#1720) fix "encoding+simplifying urls for rewrite/redirect": too many regressions.
2979 + * Use FD_CLOEXEC if possible (fixes #1821)
2980 + * Optimized buffer usage in mod_proxy (fixes #1850)
2981 + * Fix uninitialized value in time struct after strptime
2982 + * Do not pass Proxy-Connection: header from client to backend http server in mod_proxy (#1877)
2983 + * Fix wrong malloc sizes in mod_accesslog (probably nothing bad happened...) (fixes #1855, thx ycheng)
2984 + * Some small buffer.c fixes (closes #1837)
2985 + * Remove floating point math from server.c (fixes #1402)
2986 + * Disable SSLv2 by default
2987 + * Use/enforce sane max-connection values (fixes #1803)
2988 + * Allow mod_compress to return 304 (Not Modified); compress ignores the static-file.etags option.(fixes #1884)
2989 + * Add option to ignore the "Expect: 100-continue" header instead of returning 417 Expectation failed (closes #1017)
2990 + * Use modified etags in mod_compress (fixes #1800)
2991 + * Fix max-connection limit handling/100% cpu usage (fixes #1436)
2992 + * Fix error handling in freebsd-sendfile (fixes #1813)
2993 + * Silenced the annoying "request timed out" warning, enable with the "debug.log-timeouts" option (fixes #1529)
2994 + * Allow tabs in header values (fixes #1822)
2995 + * Added Language conditional (fixes #1119); patch by petar
2997 +- 1.4.20 - 2008-09-30
2999 * Fix mod_compress to compile with old gcc version (#1592)
3000 * Fix mod_extforward to compile with old gcc version (#1591)
3001 * Update documentation for #1587
3003 * allow digits in [s]cgi env vars (#1712)
3004 * fixed dropping last character of evhost pattern (#161)
3005 * print helpful error message on conditionals in global block (#1550)
3006 - * decode url before matching in mod_rewrite (#1720)
3007 + * decode url before matching in mod_rewrite (#1720) -- (reverted for 1.4.21)
3008 * fixed conditional patching of ldap filter (#1564)
3009 - * Match headers case insensitive in response (removing of X-{Sendfile,LIGHTTPD-*}, catching Date/Server)
3010 - * fixed bug with case-insensitive filenames in mod_userdir (#1589), spotted by "anders1"
3011 + * Match headers case insensitive in response (removing of X-{Sendfile,LIGHTTPD-*}, catching Date/Server) [2281]
3012 + * fixed bug with case-insensitive filenames in mod_userdir (#1589), spotted by "anders1" (CVE-2008-4360)
3013 * fixed format string bugs in mod_accesslog for SYSLOG
3014 * replaced fprintf with log_error_write in fastcgi debug
3015 * fixed mem leak in ssi expression parser (#1753), thx Take5k
3017 * fix splitting of auth-ldap filter
3018 * workaround ldap connection leak if a ldap connection failed (restarting ldap)
3019 * fix auth.backend.ldap.bind-dn/pw problems (only read from global context for temporary ldap reconnects, thx ruskie)
3020 - * fix memleak in request header parsing (#1774, thx qhy)
3021 + * fix memleak in request header parsing (#1774, thx qhy) (CVE-2008-4298)
3022 * fix mod_rewrite memleak/endless loop detection (#1775, thx phy - again!)
3023 - * use decoded url for matching in mod_redirect (#1720)
3024 + * use decoded url for matching in mod_redirect (#1720) (CVE-2008-4359) -- (reverted for 1.4.21)
3026 - 1.4.19 - 2008-03-10
3028 Index: CMakeLists.txt
3029 ===================================================================
3030 --- CMakeLists.txt (.../tags/lighttpd-1.4.20) (revision 0)
3031 +++ CMakeLists.txt (.../branches/lighttpd-1.4.x) (revision 2392)
3033 +PROJECT(lighttpd C)
3035 +CMAKE_MINIMUM_REQUIRED(VERSION 2.4.0 FATAL_ERROR)
3037 +SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
3043 +SET(CPACK_PACKAGE_VERSION_MAJOR 1)
3044 +SET(CPACK_PACKAGE_VERSION_MINOR 4)
3045 +SET(CPACK_PACKAGE_VERSION_PATCH 21)
3046 +SET(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
3048 +SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING")
3049 +SET(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README")
3050 +SET(CPACK_PACKAGE_VENDOR "jan@kneschke.de")
3052 +SET(CPACK_SOURCE_GENERATOR "TGZ")
3053 +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$")
3055 +SET(CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
3057 +ADD_SUBDIRECTORY(src build)
3058 +#ADD_SUBDIRECTORY(doc)
3059 +ADD_SUBDIRECTORY(tests)
3061 Property changes on: .
3062 ___________________________________________________________________
3063 Modified: bzr:revision-info
3064 - timestamp: 2008-09-23 21:04:22.819999933 +0200
3065 committer: Stefan Bühler <stbuehler@web.de>
3067 branch-nick: lighttpd-1.4.x
3069 + timestamp: 2009-02-05 23:27:05.799999952 +0100
3070 committer: Stefan Bühler <stbuehler@web.de>
3072 branch-nick: lighttpd-1.4.x
3074 Modified: bzr:revision-id:v3-trunk0
3075 - 1127 stbuehler@web.de-20080728081644-j4cxnhduw8kbt8um
3076 1128 stbuehler@web.de-20080728084246-axvxdtjsrratxixs
3077 1129 stbuehler@web.de-20080729211700-s8v6nq2cu06qesls
3078 1130 stbuehler@web.de-20080729211726-4yxb6e5dva1cn0lz
3079 1131 stbuehler@web.de-20080729211750-4ulzigswx17uciyu
3080 1132 stbuehler@web.de-20080729211850-nliz3kd0m576ztuu
3081 1133 stbuehler@web.de-20080730163440-dg2y2sbf0u4grmn4
3082 1134 stbuehler@web.de-20080730173952-kiutzg6geqy7mick
3083 1135 stbuehler@web.de-20080730193616-9kc2ms7rrhv1lkn7
3084 1136 stbuehler@web.de-20080730211457-z4a6uth1y29glbqh
3085 1137 stbuehler@web.de-20080730213517-b6sjcrdwbmipl334
3086 1138 stbuehler@web.de-20080731102617-2xw8unjfqic7lsew
3087 1139 stbuehler@web.de-20080731102703-q4tu5a6em9y8xdg0
3088 1140 stbuehler@web.de-20080731102729-l6vn5b05w9swqbg5
3089 1141 stbuehler@web.de-20080731102756-oj3d4tnk0l90mj77
3090 1142 stbuehler@web.de-20080731204442-blw14cj2fkr3l8ly
3091 1143 stbuehler@web.de-20080731204508-imtfnurf922mg7tj
3092 1144 stbuehler@web.de-20080801112347-girnwswdkwm8wuip
3093 1145 stbuehler@web.de-20080801161245-kx1temr529o7xko9
3094 1146 stbuehler@web.de-20080801175332-oc9e7x8edn1owcc0
3095 1147 stbuehler@web.de-20080801183454-5i66v0gsdv0cgmia
3096 1148 stbuehler@web.de-20080801192849-6zklfbb832sx0hvr
3097 1149 stbuehler@web.de-20080801203119-o16elp8w854s6lol
3098 1150 stbuehler@web.de-20080802162146-a4v57svc788pwdsv
3099 1151 stbuehler@web.de-20080802162202-9udlc1wuwt09pyh2
3100 1152 stbuehler@web.de-20080804135803-yuor9ze06px7qta4
3101 1153 stbuehler@web.de-20080812194728-fupt781o6q058unh
3102 1154 stbuehler@web.de-20080818162116-piz0ukqsaecv2li2
3103 1155 stbuehler@web.de-20080818235700-94t0xc6ml70zojwq
3104 1156 stbuehler@web.de-20080819163650-1qhwsqszr78cr4xx
3105 1157 stbuehler@web.de-20080819163757-1qq3t1f1wj69t8xs
3106 1158 stbuehler@web.de-20080819163914-rklhkurg8apv85l2
3107 1159 stbuehler@web.de-20080819163953-tlqew751e43phf5b
3108 1160 stbuehler@web.de-20080819164108-8ogh68sm1uyteawe
3109 1161 stbuehler@web.de-20080819173911-w5bqpb7cp9jmdqye
3110 1162 stbuehler@web.de-20080819222242-c0ta5gnli9p3j35a
3111 1163 stbuehler@web.de-20080820100730-g1bwdh4nqb53ag9u
3112 1164 stbuehler@web.de-20080820100752-9pggugdyfnnps8qu
3113 1165 stbuehler@web.de-20080820164258-v2j00motsrsc5esp
3114 1166 stbuehler@web.de-20080827144628-hi9hf4ch3n1wf9ao
3115 1167 stbuehler@web.de-20080827144903-tfxu4yehlyu5kegc
3116 1168 stbuehler@web.de-20080827155155-7mt92orehbxkh2lh
3117 1169 stbuehler@web.de-20080917142048-zbcwpk39q9ewd516
3118 1170 stbuehler@web.de-20080917142300-16gzt21x4nbjtj87
3119 1171 stbuehler@web.de-20080919160134-385anjnd3txxdw3x
3120 1172 stbuehler@web.de-20080920134142-fvvwaw2ys51dg4rj
3121 1173 stbuehler@web.de-20080921153311-1f7rn01atdilmxmy
3122 1174 stbuehler@web.de-20080922101346-wel327kjmykkpvmp
3123 1175 stbuehler@web.de-20080923190422-uow06l38ndue36o4
3125 + 1127 stbuehler@web.de-20080728081644-j4cxnhduw8kbt8um
3126 1128 stbuehler@web.de-20080728084246-axvxdtjsrratxixs
3127 1129 stbuehler@web.de-20080729211700-s8v6nq2cu06qesls
3128 1130 stbuehler@web.de-20080729211726-4yxb6e5dva1cn0lz
3129 1131 stbuehler@web.de-20080729211750-4ulzigswx17uciyu
3130 1132 stbuehler@web.de-20080729211850-nliz3kd0m576ztuu
3131 1133 stbuehler@web.de-20080730163440-dg2y2sbf0u4grmn4
3132 1134 stbuehler@web.de-20080730173952-kiutzg6geqy7mick
3133 1135 stbuehler@web.de-20080730193616-9kc2ms7rrhv1lkn7
3134 1136 stbuehler@web.de-20080730211457-z4a6uth1y29glbqh
3135 1137 stbuehler@web.de-20080730213517-b6sjcrdwbmipl334
3136 1138 stbuehler@web.de-20080731102617-2xw8unjfqic7lsew
3137 1139 stbuehler@web.de-20080731102703-q4tu5a6em9y8xdg0
3138 1140 stbuehler@web.de-20080731102729-l6vn5b05w9swqbg5
3139 1141 stbuehler@web.de-20080731102756-oj3d4tnk0l90mj77
3140 1142 stbuehler@web.de-20080731204442-blw14cj2fkr3l8ly
3141 1143 stbuehler@web.de-20080731204508-imtfnurf922mg7tj
3142 1144 stbuehler@web.de-20080801112347-girnwswdkwm8wuip
3143 1145 stbuehler@web.de-20080801161245-kx1temr529o7xko9
3144 1146 stbuehler@web.de-20080801175332-oc9e7x8edn1owcc0
3145 1147 stbuehler@web.de-20080801183454-5i66v0gsdv0cgmia
3146 1148 stbuehler@web.de-20080801192849-6zklfbb832sx0hvr
3147 1149 stbuehler@web.de-20080801203119-o16elp8w854s6lol
3148 1150 stbuehler@web.de-20080802162146-a4v57svc788pwdsv
3149 1151 stbuehler@web.de-20080802162202-9udlc1wuwt09pyh2
3150 1152 stbuehler@web.de-20080804135803-yuor9ze06px7qta4
3151 1153 stbuehler@web.de-20080812194728-fupt781o6q058unh
3152 1154 stbuehler@web.de-20080818162116-piz0ukqsaecv2li2
3153 1155 stbuehler@web.de-20080818235700-94t0xc6ml70zojwq
3154 1156 stbuehler@web.de-20080819163650-1qhwsqszr78cr4xx
3155 1157 stbuehler@web.de-20080819163757-1qq3t1f1wj69t8xs
3156 1158 stbuehler@web.de-20080819163914-rklhkurg8apv85l2
3157 1159 stbuehler@web.de-20080819163953-tlqew751e43phf5b
3158 1160 stbuehler@web.de-20080819164108-8ogh68sm1uyteawe
3159 1161 stbuehler@web.de-20080819173911-w5bqpb7cp9jmdqye
3160 1162 stbuehler@web.de-20080819222242-c0ta5gnli9p3j35a
3161 1163 stbuehler@web.de-20080820100730-g1bwdh4nqb53ag9u
3162 1164 stbuehler@web.de-20080820100752-9pggugdyfnnps8qu
3163 1165 stbuehler@web.de-20080820164258-v2j00motsrsc5esp
3164 1166 stbuehler@web.de-20080827144628-hi9hf4ch3n1wf9ao
3165 1167 stbuehler@web.de-20080827144903-tfxu4yehlyu5kegc
3166 1168 stbuehler@web.de-20080827155155-7mt92orehbxkh2lh
3167 1169 stbuehler@web.de-20080917142048-zbcwpk39q9ewd516
3168 1170 stbuehler@web.de-20080917142300-16gzt21x4nbjtj87
3169 1171 stbuehler@web.de-20080919160134-385anjnd3txxdw3x
3170 1172 stbuehler@web.de-20080920134142-fvvwaw2ys51dg4rj
3171 1173 stbuehler@web.de-20080921153311-1f7rn01atdilmxmy
3172 1174 stbuehler@web.de-20080922101346-wel327kjmykkpvmp
3173 1175 stbuehler@web.de-20080923190422-uow06l38ndue36o4
3174 1176 stbuehler@web.de-20080930112012-53jby2m8xslmd1hm
3175 1177 stbuehler@web.de-20080930134824-j9q72rwuiczzof5k
3176 1178 stbuehler@web.de-20080930142037-32pb6m3zjcwryw1w
3177 1179 stbuehler@web.de-20080930142756-ueovgoshyb996bce
3178 1180 stbuehler@web.de-20080930152935-1zfy67brol3xdbc0
3179 1181 stbuehler@web.de-20080930193919-13n2q4c6fbgw0dkx
3180 1182 stbuehler@web.de-20080930211152-4hmgs95wyg2deol7
3181 1183 stbuehler@web.de-20081001132402-hxnyu6yzyk3mjf4d
3182 1184 stbuehler@web.de-20081001155102-qf0mmu2kkpgr7xf0
3183 1185 stbuehler@web.de-20081001160009-n67ss0vzlac2y60k
3184 1186 stbuehler@web.de-20081001200802-l5og517etnneitk0
3185 1188 stbuehler@web.de-20081004160711-ygaohrecmutiqlla
3186 1189 stbuehler@web.de-20081004211932-vq16u26mthbeed7d
3187 1191 stbuehler@web.de-20081005224446-1bztt6zqrjh8w8fd
3188 1192 stbuehler@web.de-20081012114652-ihgz590f0gl5gxpw
3189 1193 stbuehler@web.de-20081012114716-jnzljhexi4z2gh92
3190 1195 stbuehler@web.de-20081016120614-kz39vxtz1pebho0o
3191 1196 stbuehler@web.de-20081016121103-trug4hts0o62d1ut
3192 1197 stbuehler@web.de-20081016121114-65quosenmso8frf8
3193 1198 stbuehler@web.de-20081016121421-xjjb7fb53pxu6odj
3194 1199 stbuehler@web.de-20081205222033-6qok7y19pwp3kxm9
3195 1200 stbuehler@web.de-20081205222811-49izmzxui0y9ncq6
3196 1201 stbuehler@web.de-20081205233903-708beaujtf26gprx
3197 1202 stbuehler@web.de-20081207151631-yv9bdf94zw83jxpv
3198 1203 stbuehler@web.de-20081207151822-mhyg0gkedmttdqvd
3199 1204 stbuehler@web.de-20081207151835-1m3yta2fjc4pgb8y
3200 1205 stbuehler@web.de-20081218221139-w8los43bjbhy9urh
3201 1206 stbuehler@web.de-20081218222305-5wz7000a62iqa81r
3202 1208 stbuehler@web.de-20090203201352-ivan8lsb3nkv1go5
3203 1209 stbuehler@web.de-20090203204231-03zjmk7qiol9yxgq
3204 1210 stbuehler@web.de-20090203210157-bx1e59fqple5oj3v
3205 1211 stbuehler@web.de-20090203221006-qd6w80m7lmeqgrjh
3206 1212 stbuehler@web.de-20090203225303-3dwmialad2u720h8
3207 1213 stbuehler@web.de-20090204102521-jl3vo2ftp5rsbx9y
3208 1214 stbuehler@web.de-20090204151616-n56of74dydkqdkgh
3209 1215 stbuehler@web.de-20090204172956-6wzsv0nm5nxcgfym
3210 1216 stbuehler@web.de-20090205105134-6i5key9439wspueq
3211 1217 stbuehler@web.de-20090205114017-0voscqjd5bdm9mwv
3212 1218 stbuehler@web.de-20090205114442-peekxwpevjl3t7j3
3213 1219 stbuehler@web.de-20090205215425-vicbc6hzb3at7gj9
3214 1220 stbuehler@web.de-20090205220741-vqz9l1eui3dwnulq
3215 1221 stbuehler@web.de-20090205222705-8179v6jkv2x38l70