+Index: configure.in
+===================================================================
Index: src/configfile-glue.c
===================================================================
---- src/configfile-glue.c (.../tags/lighttpd-1.4.18) (revision 2026)
-+++ src/configfile-glue.c (.../branches/lighttpd-1.4.x) (revision 2026)
+--- src/configfile-glue.c (.../tags/lighttpd-1.4.18) (revision 2039)
++++ src/configfile-glue.c (.../branches/lighttpd-1.4.x) (revision 2039)
@@ -341,6 +341,10 @@
}
break;
break;
Index: src/array.h
===================================================================
---- src/array.h (.../tags/lighttpd-1.4.18) (revision 2026)
-+++ src/array.h (.../branches/lighttpd-1.4.x) (revision 2026)
+--- src/array.h (.../tags/lighttpd-1.4.18) (revision 2039)
++++ src/array.h (.../branches/lighttpd-1.4.x) (revision 2039)
@@ -90,6 +90,7 @@
COMP_HTTP_COOKIE,
COMP_HTTP_REMOTEIP,
} comp_key_t;
Index: src/mod_staticfile.c
===================================================================
---- src/mod_staticfile.c (.../tags/lighttpd-1.4.18) (revision 2026)
-+++ src/mod_staticfile.c (.../branches/lighttpd-1.4.x) (revision 2026)
+--- src/mod_staticfile.c (.../tags/lighttpd-1.4.18) (revision 2039)
++++ src/mod_staticfile.c (.../branches/lighttpd-1.4.x) (revision 2039)
@@ -483,8 +483,24 @@
/* if the value is the same as our ETag, we do a Range-request,
* otherwise a full 200 */
}
}
+Index: src/mod_scgi.c
+===================================================================
+--- src/mod_scgi.c (.../tags/lighttpd-1.4.18) (revision 2039)
++++ src/mod_scgi.c (.../branches/lighttpd-1.4.x) (revision 2039)
+@@ -2694,8 +2694,9 @@
+ if (s_len < ct_len) continue;
+
+ /* check extension in the form "/scgi_pattern" */
+- if (*(extension->key->ptr) == '/' && strncmp(fn->ptr, extension->key->ptr, ct_len) == 0) {
+- break;
++ if (*(extension->key->ptr) == '/') {
++ if (strncmp(fn->ptr, extension->key->ptr, ct_len) == 0)
++ break;
+ } else if (0 == strncmp(fn->ptr + s_len - ct_len, extension->key->ptr, ct_len)) {
+ /* check extension in the form ".fcg" */
+ break;
Index: src/response.c
===================================================================
---- src/response.c (.../tags/lighttpd-1.4.18) (revision 2026)
-+++ src/response.c (.../branches/lighttpd-1.4.x) (revision 2026)
-@@ -180,6 +180,7 @@
+--- src/response.c (.../tags/lighttpd-1.4.18) (revision 2039)
++++ src/response.c (.../branches/lighttpd-1.4.x) (revision 2039)
+@@ -59,7 +59,8 @@
+ ds = (data_string *)con->response.headers->data[i];
+
+ if (ds->value->used && ds->key->used &&
+- 0 != strncmp(ds->key->ptr, "X-LIGHTTPD-", sizeof("X-LIGHTTPD-") - 1)) {
++ 0 != strncmp(ds->key->ptr, "X-LIGHTTPD-", sizeof("X-LIGHTTPD-") - 1) &&
++ 0 != strncmp(ds->key->ptr, "X-Sendfile", sizeof("X-Sendfile") - 1)) {
+ if (buffer_is_equal_string(ds->key, CONST_STR_LEN("Date"))) have_date = 1;
+ if (buffer_is_equal_string(ds->key, CONST_STR_LEN("Server"))) have_server = 1;
+
+@@ -180,6 +181,7 @@
buffer_copy_string_buffer(con->uri.authority, con->request.http_host);
buffer_to_lower(con->uri.authority);
config_patch_connection(srv, con, COMP_HTTP_HOST); /* Host: */
config_patch_connection(srv, con, COMP_HTTP_REMOTEIP); /* Client-IP */
config_patch_connection(srv, con, COMP_HTTP_REFERER); /* Referer: */
+Index: src/mod_proxy.c
+===================================================================
+--- src/mod_proxy.c (.../tags/lighttpd-1.4.18) (revision 2039)
++++ src/mod_proxy.c (.../branches/lighttpd-1.4.x) (revision 2039)
+@@ -1093,15 +1093,17 @@
+ if (s_len < ct_len) continue;
+
+ /* check extension in the form "/proxy_pattern" */
+- if (*(extension->key->ptr) == '/' && strncmp(fn->ptr, extension->key->ptr, ct_len) == 0) {
+- if (s_len > ct_len + 1) {
+- char *pi_offset;
++ if (*(extension->key->ptr) == '/') {
++ if (strncmp(fn->ptr, extension->key->ptr, ct_len) == 0) {
++ if (s_len > ct_len + 1) {
++ char *pi_offset;
+
+- if (0 != (pi_offset = strchr(fn->ptr + ct_len + 1, '/'))) {
+- path_info_offset = pi_offset - fn->ptr;
++ if (0 != (pi_offset = strchr(fn->ptr + ct_len + 1, '/'))) {
++ path_info_offset = pi_offset - fn->ptr;
++ }
+ }
++ break;
+ }
+- break;
+ } else if (0 == strncmp(fn->ptr + s_len - ct_len, extension->key->ptr, ct_len)) {
+ /* check extension in the form ".fcg" */
+ break;
Index: src/configparser.y
===================================================================
---- src/configparser.y (.../tags/lighttpd-1.4.18) (revision 2026)
-+++ src/configparser.y (.../branches/lighttpd-1.4.x) (revision 2026)
+--- src/configparser.y (.../tags/lighttpd-1.4.18) (revision 2039)
++++ src/configparser.y (.../branches/lighttpd-1.4.x) (revision 2039)
@@ -422,6 +422,7 @@
{ COMP_HTTP_COOKIE, CONST_STR_LEN("HTTP[\"cookie\"]" ) },
{ COMP_HTTP_REMOTEIP, CONST_STR_LEN("HTTP[\"remoteip\"]" ) },
size_t i;
Index: src/spawn-fcgi.c
===================================================================
---- src/spawn-fcgi.c (.../tags/lighttpd-1.4.18) (revision 2026)
-+++ src/spawn-fcgi.c (.../branches/lighttpd-1.4.x) (revision 2026)
+--- src/spawn-fcgi.c (.../tags/lighttpd-1.4.18) (revision 2039)
++++ src/spawn-fcgi.c (.../branches/lighttpd-1.4.x) (revision 2039)
@@ -37,7 +37,7 @@
#endif
int main() {
Index: src/mod_auth.c
===================================================================
---- src/mod_auth.c (.../tags/lighttpd-1.4.18) (revision 2026)
-+++ src/mod_auth.c (.../branches/lighttpd-1.4.x) (revision 2026)
+--- src/mod_auth.c (.../tags/lighttpd-1.4.18) (revision 2039)
++++ src/mod_auth.c (.../branches/lighttpd-1.4.x) (revision 2039)
@@ -238,13 +238,13 @@
int auth_type_len = auth_realm - http_authorization;
if (0 == strcmp(method->value->ptr, "digest")) {
if (-1 == (auth_satisfied = http_auth_digest_check(srv, con, p, req, con->uri.path, auth_realm+1))) {
con->http_status = 400;
+Index: src/mod_fastcgi.c
+===================================================================
+--- src/mod_fastcgi.c (.../tags/lighttpd-1.4.18) (revision 2039)
++++ src/mod_fastcgi.c (.../branches/lighttpd-1.4.x) (revision 2039)
+@@ -162,8 +162,8 @@
+ * if host is one of the local IP adresses the
+ * whole connection is local
+ *
+- * if tcp/ip should be used host AND port have
+- * to be specified
++ * if port is not 0, and host is not specified,
++ * "localhost" (INADDR_LOOPBACK) is assumed.
+ *
+ */
+ buffer *host;
+@@ -823,12 +823,12 @@
+ fcgi_addr_in.sin_family = AF_INET;
+
+ if (buffer_is_empty(host->host)) {
+- fcgi_addr_in.sin_addr.s_addr = htonl(INADDR_ANY);
++ fcgi_addr_in.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
+ } else {
+ struct hostent *he;
+
+ /* set a useful default */
+- fcgi_addr_in.sin_addr.s_addr = htonl(INADDR_ANY);
++ fcgi_addr_in.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
+
+
+ if (NULL == (he = gethostbyname(host->host->ptr))) {
+@@ -858,7 +858,11 @@
+ fcgi_addr = (struct sockaddr *) &fcgi_addr_in;
+
+ buffer_copy_string(proc->connection_name, "tcp:");
+- buffer_append_string_buffer(proc->connection_name, host->host);
++ if (!buffer_is_empty(host->host)) {
++ buffer_append_string_buffer(proc->connection_name, host->host);
++ } else {
++ buffer_append_string(proc->connection_name, "localhost");
++ }
+ buffer_append_string(proc->connection_name, ":");
+ buffer_append_long(proc->connection_name, proc->port);
+ }
+@@ -1687,12 +1691,16 @@
+ #endif
+ } else {
+ fcgi_addr_in.sin_family = AF_INET;
+- if (0 == inet_aton(host->host->ptr, &(fcgi_addr_in.sin_addr))) {
+- log_error_write(srv, __FILE__, __LINE__, "sbs",
+- "converting IP address failed for", host->host,
+- "\nBe sure to specify an IP address here");
+-
+- return -1;
++ if (!buffer_is_empty(host->host)) {
++ if (0 == inet_aton(host->host->ptr, &(fcgi_addr_in.sin_addr))) {
++ log_error_write(srv, __FILE__, __LINE__, "sbs",
++ "converting IP address failed for", host->host,
++ "\nBe sure to specify an IP address here");
++
++ return -1;
++ }
++ } else {
++ fcgi_addr_in.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
+ }
+ fcgi_addr_in.sin_port = htons(proc->port);
+ servlen = sizeof(fcgi_addr_in);
+@@ -1702,7 +1710,11 @@
+ if (buffer_is_empty(proc->connection_name)) {
+ /* on remote spawing we have to set the connection-name now */
+ buffer_copy_string(proc->connection_name, "tcp:");
+- buffer_append_string_buffer(proc->connection_name, host->host);
++ if (!buffer_is_empty(host->host)) {
++ buffer_append_string_buffer(proc->connection_name, host->host);
++ } else {
++ buffer_append_string(proc->connection_name, "localhost");
++ }
+ buffer_append_string(proc->connection_name, ":");
+ buffer_append_long(proc->connection_name, proc->port);
+ }
+@@ -2530,15 +2542,28 @@
+ }
+
+ if (host->allow_xsendfile &&
+- NULL != (ds = (data_string *) array_get_element(con->response.headers, "X-LIGHTTPD-send-file"))) {
++ (NULL != (ds = (data_string *) array_get_element(con->response.headers, "X-LIGHTTPD-send-file"))
++ || NULL != (ds = (data_string *) array_get_element(con->response.headers, "X-Sendfile")))) {
+ stat_cache_entry *sce;
+
+ if (HANDLER_ERROR != stat_cache_get_entry(srv, con, ds->value, &sce)) {
++ data_string *dcls = data_string_init();
+ /* found */
+-
+ http_chunk_append_file(srv, con, ds->value, 0, sce->st.st_size);
+ hctx->send_content_body = 0; /* ignore the content */
+ joblist_append(srv, con);
++
++ buffer_copy_string_len(dcls->key, "Content-Length", sizeof("Content-Length")-1);
++ buffer_copy_long(dcls->value, sce->st.st_size);
++ dcls = (data_string*) array_replace(con->response.headers, (data_unset *)dcls);
++ if (dcls) dcls->free((data_unset*)dcls);
++
++ con->parsed_response |= HTTP_CONTENT_LENGTH;
++ con->response.content_length = sce->st.st_size;
++ } else {
++ log_error_write(srv, __FILE__, __LINE__, "sb",
++ "send-file error: couldn't get stat_cache entry for:",
++ ds->value);
+ }
+ }
+
+@@ -2719,9 +2744,14 @@
+
+ int ret;
+
+- /* sanity check */
++ /* sanity check:
++ * - host != NULL
++ * - either:
++ * - tcp socket (do not check host->host->uses, as it may be not set which means INADDR_LOOPBACK)
++ * - unix socket
++ */
+ if (!host ||
+- ((!host->host->used || !host->port) && !host->unixsocket->used)) {
++ (!host->port && !host->unixsocket->used)) {
+ log_error_write(srv, __FILE__, __LINE__, "sxddd",
+ "write-req: error",
+ host,
+@@ -3456,8 +3486,9 @@
+ if (s_len < ct_len) continue;
+
+ /* check extension in the form "/fcgi_pattern" */
+- if (*(extension->key->ptr) == '/' && strncmp(fn->ptr, extension->key->ptr, ct_len) == 0) {
+- break;
++ if (*(extension->key->ptr) == '/') {
++ if (strncmp(fn->ptr, extension->key->ptr, ct_len) == 0)
++ break;
+ } else if (0 == strncmp(fn->ptr + s_len - ct_len, extension->key->ptr, ct_len)) {
+ /* check extension in the form ".fcg" */
+ break;
+@@ -3473,7 +3504,7 @@
+ for (k = 0; k < extension->used; k++) {
+ host = extension->hosts[k];
+
+- /* we should have at least one proc that can do somthing */
++ /* we should have at least one proc that can do something */
+ if (host->active_procs == 0) {
+ host = NULL;
+
Index: src/server.c
===================================================================
---- src/server.c (.../tags/lighttpd-1.4.18) (revision 2026)
-+++ src/server.c (.../branches/lighttpd-1.4.x) (revision 2026)
+--- src/server.c (.../tags/lighttpd-1.4.18) (revision 2039)
++++ src/server.c (.../branches/lighttpd-1.4.x) (revision 2039)
@@ -759,6 +759,19 @@
return -1;
setuid(pwd->pw_uid);
}
#endif
+Index: tests/mod-access.t
+===================================================================
+--- tests/mod-access.t (.../tags/lighttpd-1.4.18) (revision 2039)
++++ tests/mod-access.t (.../branches/lighttpd-1.4.x) (revision 2039)
+@@ -1,9 +1,9 @@
+ #!/usr/bin/env perl
+ BEGIN {
+- # add current source dir to the include-path
+- # we need this for make distcheck
+- (my $srcdir = $0) =~ s#/[^/]+$#/#;
+- unshift @INC, $srcdir;
++ # add current source dir to the include-path
++ # we need this for make distcheck
++ (my $srcdir = $0) =~ s,/[^/]+$,/,;
++ unshift @INC, $srcdir;
+ }
+
+ use strict;
Index: tests/mod-auth.t
===================================================================
---- tests/mod-auth.t (.../tags/lighttpd-1.4.18) (revision 2026)
-+++ tests/mod-auth.t (.../branches/lighttpd-1.4.x) (revision 2026)
-@@ -8,7 +8,7 @@
+--- tests/mod-auth.t (.../tags/lighttpd-1.4.18) (revision 2039)
++++ tests/mod-auth.t (.../branches/lighttpd-1.4.x) (revision 2039)
+@@ -1,14 +1,14 @@
+ #!/usr/bin/env perl
+ BEGIN {
+- # add current source dir to the include-path
+- # we need this for make distcheck
+- (my $srcdir = $0) =~ s#/[^/]+$#/#;
+- unshift @INC, $srcdir;
++ # add current source dir to the include-path
++ # we need this for make distcheck
++ (my $srcdir = $0) =~ s,/[^/]+$,/,;
++ unshift @INC, $srcdir;
+ }
use strict;
use IO::Socket;
SKIP: {
skip "no md5 for crypt under cygwin", 1 if $^O eq 'cygwin';
$t->{REQUEST} = ( <<EOF
+Index: tests/mod-secdownload.t
+===================================================================
+--- tests/mod-secdownload.t (.../tags/lighttpd-1.4.18) (revision 2039)
++++ tests/mod-secdownload.t (.../branches/lighttpd-1.4.x) (revision 2039)
+@@ -1,9 +1,9 @@
+ #!/usr/bin/env perl
+ BEGIN {
+- # add current source dir to the include-path
+- # we need this for make distcheck
+- (my $srcdir = $0) =~ s#/[^/]+$#/#;
+- unshift @INC, $srcdir;
++ # add current source dir to the include-path
++ # we need this for make distcheck
++ (my $srcdir = $0) =~ s,/[^/]+$,/,;
++ unshift @INC, $srcdir;
+ }
+
+ use strict;
+Index: tests/core-response.t
+===================================================================
+--- tests/core-response.t (.../tags/lighttpd-1.4.18) (revision 2039)
++++ tests/core-response.t (.../branches/lighttpd-1.4.x) (revision 2039)
+@@ -1,10 +1,9 @@
+ #!/usr/bin/env perl
+-
+ BEGIN {
+- # add current source dir to the include-path
+- # we need this for make distcheck
+- (my $srcdir = $0) =~ s#/[^/]+$#/#;
+- unshift @INC, $srcdir;
++ # add current source dir to the include-path
++ # we need this for make distcheck
++ (my $srcdir = $0) =~ s,/[^/]+$,/,;
++ unshift @INC, $srcdir;
+ }
+
+ use strict;
+Index: tests/symlink.t
+===================================================================
+--- tests/symlink.t (.../tags/lighttpd-1.4.18) (revision 2039)
++++ tests/symlink.t (.../branches/lighttpd-1.4.x) (revision 2039)
+@@ -1,9 +1,9 @@
+ #!/usr/bin/env perl
+ BEGIN {
+- # add current source dir to the include-path
+- # we need this for make distcheck
+- (my $srcdir = $0) =~ s#/[^/]+$#/#;
+- unshift @INC, $srcdir;
++ # add current source dir to the include-path
++ # we need this for make distcheck
++ (my $srcdir = $0) =~ s,/[^/]+$,/,;
++ unshift @INC, $srcdir;
+ }
+
+ use strict;
+Index: tests/request.t
+===================================================================
+--- tests/request.t (.../tags/lighttpd-1.4.18) (revision 2039)
++++ tests/request.t (.../branches/lighttpd-1.4.x) (revision 2039)
+@@ -1,9 +1,9 @@
+ #!/usr/bin/env perl
+ BEGIN {
+- # add current source dir to the include-path
+- # we need this for make distcheck
+- (my $srcdir = $0) =~ s#/[^/]+$#/#;
+- unshift @INC, $srcdir;
++ # add current source dir to the include-path
++ # we need this for make distcheck
++ (my $srcdir = $0) =~ s,/[^/]+$,/,;
++ unshift @INC, $srcdir;
+ }
+
+ use strict;
+Index: tests/mod-userdir.t
+===================================================================
+--- tests/mod-userdir.t (.../tags/lighttpd-1.4.18) (revision 2039)
++++ tests/mod-userdir.t (.../branches/lighttpd-1.4.x) (revision 2039)
+@@ -1,9 +1,9 @@
+ #!/usr/bin/env perl
+ BEGIN {
+- # add current source dir to the include-path
+- # we need this for make distcheck
+- (my $srcdir = $0) =~ s#/[^/]+$#/#;
+- unshift @INC, $srcdir;
++ # add current source dir to the include-path
++ # we need this for make distcheck
++ (my $srcdir = $0) =~ s,/[^/]+$,/,;
++ unshift @INC, $srcdir;
+ }
+
+ use strict;
+Index: tests/core-keepalive.t
+===================================================================
+--- tests/core-keepalive.t (.../tags/lighttpd-1.4.18) (revision 2039)
++++ tests/core-keepalive.t (.../branches/lighttpd-1.4.x) (revision 2039)
+@@ -1,10 +1,9 @@
+ #!/usr/bin/env perl
+-
+ BEGIN {
+- # add current source dir to the include-path
+- # we need this for make distcheck
+- (my $srcdir = $0) =~ s#/[^/]+$#/#;
+- unshift @INC, $srcdir;
++ # add current source dir to the include-path
++ # we need this for make distcheck
++ (my $srcdir = $0) =~ s,/[^/]+$,/,;
++ unshift @INC, $srcdir;
+ }
+
+ use strict;
+Index: tests/env-variables.t
+===================================================================
+--- tests/env-variables.t (.../tags/lighttpd-1.4.18) (revision 2039)
++++ tests/env-variables.t (.../branches/lighttpd-1.4.x) (revision 2039)
+@@ -1,10 +1,9 @@
+ #!/usr/bin/perl
+-
+ BEGIN {
+- # add current source dir to the include-path
+- # we need this for make distcheck
+- (my $srcdir = $0) =~ s#/[^/]+$#/#;
+- unshift @INC, $srcdir;
++ # add current source dir to the include-path
++ # we need this for make distcheck
++ (my $srcdir = $0) =~ s,/[^/]+$,/,;
++ unshift @INC, $srcdir;
+ }
+
+ use strict;
+Index: tests/mod-proxy.t
+===================================================================
+--- tests/mod-proxy.t (.../tags/lighttpd-1.4.18) (revision 2039)
++++ tests/mod-proxy.t (.../branches/lighttpd-1.4.x) (revision 2039)
+@@ -1,9 +1,9 @@
+ #!/usr/bin/env perl
+ BEGIN {
+- # add current source dir to the include-path
+- # we need this for make distcheck
+- (my $srcdir = $0) =~ s#/[^/]+$#/#;
+- unshift @INC, $srcdir;
++ # add current source dir to the include-path
++ # we need this for make distcheck
++ (my $srcdir = $0) =~ s,/[^/]+$,/,;
++ unshift @INC, $srcdir;
+ }
+
+ use strict;
+Index: tests/core-var-include.t
+===================================================================
+--- tests/core-var-include.t (.../tags/lighttpd-1.4.18) (revision 2039)
++++ tests/core-var-include.t (.../branches/lighttpd-1.4.x) (revision 2039)
+@@ -1,9 +1,9 @@
+ #!/usr/bin/env perl
+ BEGIN {
+- # add current source dir to the include-path
+- # we need this for make distcheck
+- (my $srcdir = $0) =~ s#/[^/]+$#/#;
+- unshift @INC, $srcdir;
++ # add current source dir to the include-path
++ # we need this for make distcheck
++ (my $srcdir = $0) =~ s,/[^/]+$,/,;
++ unshift @INC, $srcdir;
+ }
+
+ use strict;
+Index: tests/core-request.t
+===================================================================
+--- tests/core-request.t (.../tags/lighttpd-1.4.18) (revision 2039)
++++ tests/core-request.t (.../branches/lighttpd-1.4.x) (revision 2039)
+@@ -1,9 +1,9 @@
+ #!/usr/bin/env perl
+ BEGIN {
+- # add current source dir to the include-path
+- # we need this for make distcheck
+- (my $srcdir = $0) =~ s#/[^/]+$#/#;
+- unshift @INC, $srcdir;
++ # add current source dir to the include-path
++ # we need this for make distcheck
++ (my $srcdir = $0) =~ s,/[^/]+$,/,;
++ unshift @INC, $srcdir;
+ }
+
+ use strict;
+Index: tests/mod-redirect.t
+===================================================================
+--- tests/mod-redirect.t (.../tags/lighttpd-1.4.18) (revision 2039)
++++ tests/mod-redirect.t (.../branches/lighttpd-1.4.x) (revision 2039)
+@@ -1,9 +1,9 @@
+ #!/usr/bin/env perl
+ BEGIN {
+- # add current source dir to the include-path
+- # we need this for make distcheck
+- (my $srcdir = $0) =~ s#/[^/]+$#/#;
+- unshift @INC, $srcdir;
++ # add current source dir to the include-path
++ # we need this for make distcheck
++ (my $srcdir = $0) =~ s,/[^/]+$,/,;
++ unshift @INC, $srcdir;
+ }
+
+ use strict;
+Index: tests/mod-cgi.t
+===================================================================
+--- tests/mod-cgi.t (.../tags/lighttpd-1.4.18) (revision 2039)
++++ tests/mod-cgi.t (.../branches/lighttpd-1.4.x) (revision 2039)
+@@ -1,9 +1,9 @@
+ #!/usr/bin/env perl
+ BEGIN {
+- # add current source dir to the include-path
+- # we need this for make distcheck
+- (my $srcdir = $0) =~ s#/[^/]+$#/#;
+- unshift @INC, $srcdir;
++ # add current source dir to the include-path
++ # we need this for make distcheck
++ (my $srcdir = $0) =~ s,/[^/]+$,/,;
++ unshift @INC, $srcdir;
+ }
+
+ use strict;
+Index: tests/mod-setenv.t
+===================================================================
+--- tests/mod-setenv.t (.../tags/lighttpd-1.4.18) (revision 2039)
++++ tests/mod-setenv.t (.../branches/lighttpd-1.4.x) (revision 2039)
+@@ -1,10 +1,9 @@
+ #!/usr/bin/env perl
+-
+ BEGIN {
+- # add current source dir to the include-path
+- # we need this for make distcheck
+- (my $srcdir = $0) =~ s#/[^/]+$#/#;
+- unshift @INC, $srcdir;
++ # add current source dir to the include-path
++ # we need this for make distcheck
++ (my $srcdir = $0) =~ s,/[^/]+$,/,;
++ unshift @INC, $srcdir;
+ }
+
+ use strict;
+Index: tests/cachable.t
+===================================================================
+--- tests/cachable.t (.../tags/lighttpd-1.4.18) (revision 2039)
++++ tests/cachable.t (.../branches/lighttpd-1.4.x) (revision 2039)
+@@ -1,9 +1,9 @@
+ #!/usr/bin/env perl
+ BEGIN {
+- # add current source dir to the include-path
+- # we need this for make distcheck
+- (my $srcdir = $0) =~ s#/[^/]+$#/#;
+- unshift @INC, $srcdir;
++ # add current source dir to the include-path
++ # we need this for make distcheck
++ (my $srcdir = $0) =~ s,/[^/]+$,/,;
++ unshift @INC, $srcdir;
+ }
+
+ use strict;
+Index: tests/lowercase.t
+===================================================================
+--- tests/lowercase.t (.../tags/lighttpd-1.4.18) (revision 2039)
++++ tests/lowercase.t (.../branches/lighttpd-1.4.x) (revision 2039)
+@@ -1,9 +1,9 @@
+ #!/usr/bin/env perl
+ BEGIN {
+- # add current source dir to the include-path
+- # we need this for make distcheck
+- (my $srcdir = $0) =~ s#/[^/]+$#/#;
+- unshift @INC, $srcdir;
++ # add current source dir to the include-path
++ # we need this for make distcheck
++ (my $srcdir = $0) =~ s,/[^/]+$,/,;
++ unshift @INC, $srcdir;
+ }
+
+ use strict;
+Index: tests/core.t
+===================================================================
+--- tests/core.t (.../tags/lighttpd-1.4.18) (revision 2039)
++++ tests/core.t (.../branches/lighttpd-1.4.x) (revision 2039)
+@@ -1,10 +1,9 @@
+ #!/usr/bin/env perl
+-
+ BEGIN {
+- # add current source dir to the include-path
+- # we need this for make distcheck
+- (my $srcdir = $0) =~ s#/[^/]+$#/#;
+- unshift @INC, $srcdir;
++ # add current source dir to the include-path
++ # we need this for make distcheck
++ (my $srcdir = $0) =~ s,/[^/]+$,/,;
++ unshift @INC, $srcdir;
+ }
+
+ use strict;
+Index: tests/mod-fastcgi.t
+===================================================================
+--- tests/mod-fastcgi.t (.../tags/lighttpd-1.4.18) (revision 2039)
++++ tests/mod-fastcgi.t (.../branches/lighttpd-1.4.x) (revision 2039)
+@@ -1,9 +1,9 @@
+ #!/usr/bin/env perl
+ BEGIN {
+- # add current source dir to the include-path
+- # we need this for make distcheck
+- (my $srcdir = $0) =~ s#/[^/]+$#/#;
+- unshift @INC, $srcdir;
++ # add current source dir to the include-path
++ # we need this for make distcheck
++ (my $srcdir = $0) =~ s,/[^/]+$,/,;
++ unshift @INC, $srcdir;
+ }
+
+ use strict;
+Index: tests/mod-rewrite.t
+===================================================================
+--- tests/mod-rewrite.t (.../tags/lighttpd-1.4.18) (revision 2039)
++++ tests/mod-rewrite.t (.../branches/lighttpd-1.4.x) (revision 2039)
+@@ -1,9 +1,9 @@
+ #!/usr/bin/env perl
+ BEGIN {
+- # add current source dir to the include-path
+- # we need this for make distcheck
+- (my $srcdir = $0) =~ s#/[^/]+$#/#;
+- unshift @INC, $srcdir;
++ # add current source dir to the include-path
++ # we need this for make distcheck
++ (my $srcdir = $0) =~ s,/[^/]+$,/,;
++ unshift @INC, $srcdir;
+ }
+
+ use strict;
+Index: tests/core-404-handler.t
+===================================================================
+--- tests/core-404-handler.t (.../tags/lighttpd-1.4.18) (revision 2039)
++++ tests/core-404-handler.t (.../branches/lighttpd-1.4.x) (revision 2039)
+@@ -10,10 +10,10 @@
+ # returning no status -> 200
+ #
+ BEGIN {
+- # add current source dir to the include-path
+- # we need this for make distcheck
+- (my $srcdir = $0) =~ s#/[^/]+$#/#;
+- unshift @INC, $srcdir;
++ # add current source dir to the include-path
++ # we need this for make distcheck
++ (my $srcdir = $0) =~ s,/[^/]+$,/,;
++ unshift @INC, $srcdir;
+ }
+
+ use strict;
+Index: tests/mod-compress.t
+===================================================================
+--- tests/mod-compress.t (.../tags/lighttpd-1.4.18) (revision 2039)
++++ tests/mod-compress.t (.../branches/lighttpd-1.4.x) (revision 2039)
+@@ -1,9 +1,9 @@
+ #!/usr/bin/env perl
+ BEGIN {
+- # add current source dir to the include-path
+- # we need this for make distcheck
+- (my $srcdir = $0) =~ s#/[^/]+$#/#;
+- unshift @INC, $srcdir;
++ # add current source dir to the include-path
++ # we need this for make distcheck
++ (my $srcdir = $0) =~ s,/[^/]+$,/,;
++ unshift @INC, $srcdir;
+ }
+
+ use strict;
+Index: tests/mod-ssi.t
+===================================================================
+--- tests/mod-ssi.t (.../tags/lighttpd-1.4.18) (revision 2039)
++++ tests/mod-ssi.t (.../branches/lighttpd-1.4.x) (revision 2039)
+@@ -1,9 +1,9 @@
+ #!/usr/bin/env perl
+ BEGIN {
+- # add current source dir to the include-path
+- # we need this for make distcheck
+- (my $srcdir = $0) =~ s#/[^/]+$#/#;
+- unshift @INC, $srcdir;
++ # add current source dir to the include-path
++ # we need this for make distcheck
++ (my $srcdir = $0) =~ s,/[^/]+$,/,;
++ unshift @INC, $srcdir;
+ }
+
+ use strict;
+Index: tests/core-condition.t
+===================================================================
+--- tests/core-condition.t (.../tags/lighttpd-1.4.18) (revision 2039)
++++ tests/core-condition.t (.../branches/lighttpd-1.4.x) (revision 2039)
+@@ -1,9 +1,9 @@
+ #!/usr/bin/env perl
+ BEGIN {
+- # add current source dir to the include-path
+- # we need this for make distcheck
+- (my $srcdir = $0) =~ s#/[^/]+$#/#;
+- unshift @INC, $srcdir;
++ # add current source dir to the include-path
++ # we need this for make distcheck
++ (my $srcdir = $0) =~ s,/[^/]+$,/,;
++ unshift @INC, $srcdir;
+ }
+
+ use strict;
Index: doc/configuration.txt
===================================================================
---- doc/configuration.txt (.../tags/lighttpd-1.4.18) (revision 2026)
-+++ doc/configuration.txt (.../branches/lighttpd-1.4.x) (revision 2026)
+--- doc/configuration.txt (.../tags/lighttpd-1.4.18) (revision 2039)
++++ doc/configuration.txt (.../branches/lighttpd-1.4.x) (revision 2039)
@@ -85,6 +85,8 @@
$HTTP["cookie"]
$HTTP["host"]
match on host
$HTTP["useragent"]
+Index: SConstruct
+===================================================================
Index: Makefile.am
===================================================================
---- Makefile.am (.../tags/lighttpd-1.4.18) (revision 2026)
-+++ Makefile.am (.../branches/lighttpd-1.4.x) (revision 2026)
+--- Makefile.am (.../tags/lighttpd-1.4.18) (revision 2039)
++++ Makefile.am (.../branches/lighttpd-1.4.x) (revision 2039)
@@ -1,3 +1,3 @@
SUBDIRS=src doc tests cygwin openwrt
+EXTRA_DIST=lighttpd.spec SConstruct
Index: NEWS
===================================================================
---- NEWS (.../tags/lighttpd-1.4.18) (revision 2026)
-+++ NEWS (.../branches/lighttpd-1.4.x) (revision 2026)
-@@ -3,6 +3,14 @@
+--- NEWS (.../tags/lighttpd-1.4.18) (revision 2039)
++++ NEWS (.../branches/lighttpd-1.4.x) (revision 2039)
+@@ -3,6 +3,19 @@
NEWS
====
+ * fixed initgroups() called after chroot (#1384)
+ * fixed case-sensitive check for Auth-Method (#1456)
+ * execute fcgi app without /bin/sh if used as argument to spawn-fcgi (#1428)
++ * fixed a bug that made /-prefixed extensions being handled also when
++ matching the end of the uri in fcgi,scgi and proxy modules (#1489)
++ * print error if X-LIGHTTPD-send-file cannot be done; reset header
++ Content-Length for send-file. Patches by Stefan Buhler
++ * prevent crash in certain php-fcgi configurations (#841)
+
- 1.4.18 - 2007-09-09
* fixed compile error on IRIX 6.5.x on prctl() (#1333)
Index: lighttpd.spec.in
===================================================================
---- lighttpd.spec.in (.../tags/lighttpd-1.4.18) (revision 2026)
-+++ lighttpd.spec.in (.../branches/lighttpd-1.4.x) (revision 2026)
+--- lighttpd.spec.in (.../tags/lighttpd-1.4.18) (revision 2039)
++++ lighttpd.spec.in (.../branches/lighttpd-1.4.x) (revision 2039)
@@ -6,21 +6,19 @@
Packager: Jan Kneschke <jan@kneschke.de>
License: BSD