2 ===================================================================
3 Index: src/configfile-glue.c
4 ===================================================================
5 --- src/configfile-glue.c (.../tags/lighttpd-1.4.18) (revision 2043)
6 +++ src/configfile-glue.c (.../branches/lighttpd-1.4.x) (revision 2043)
11 + case COMP_HTTP_SCHEME:
12 + l = con->uri.scheme;
19 ===================================================================
20 --- src/array.h (.../tags/lighttpd-1.4.18) (revision 2043)
21 +++ src/array.h (.../branches/lighttpd-1.4.x) (revision 2043)
25 COMP_HTTP_QUERYSTRING,
30 Index: src/mod_staticfile.c
31 ===================================================================
32 --- src/mod_staticfile.c (.../tags/lighttpd-1.4.18) (revision 2043)
33 +++ src/mod_staticfile.c (.../branches/lighttpd-1.4.x) (revision 2043)
35 /* if the value is the same as our ETag, we do a Range-request,
36 * otherwise a full 200 */
38 - if (!buffer_is_equal(ds->value, con->physical.etag)) {
39 + if (ds->value->ptr[0] == '"') {
41 + * client wants a ETag
43 + if (!con->physical.etag) {
44 + do_range_request = 0;
45 + } else if (!buffer_is_equal(ds->value, con->physical.etag)) {
46 + do_range_request = 0;
48 + } else if (!mtime) {
50 + * we don't have a Last-Modified and can match the If-Range:
55 + } else if (!buffer_is_equal(ds->value, mtime)) {
56 + do_range_request = 0;
61 ===================================================================
62 --- src/mod_scgi.c (.../tags/lighttpd-1.4.18) (revision 2043)
63 +++ src/mod_scgi.c (.../branches/lighttpd-1.4.x) (revision 2043)
65 if (s_len < ct_len) continue;
67 /* check extension in the form "/scgi_pattern" */
68 - if (*(extension->key->ptr) == '/' && strncmp(fn->ptr, extension->key->ptr, ct_len) == 0) {
70 + if (*(extension->key->ptr) == '/') {
71 + if (strncmp(fn->ptr, extension->key->ptr, ct_len) == 0)
73 } else if (0 == strncmp(fn->ptr + s_len - ct_len, extension->key->ptr, ct_len)) {
74 /* check extension in the form ".fcg" */
77 ===================================================================
78 --- src/response.c (.../tags/lighttpd-1.4.18) (revision 2043)
79 +++ src/response.c (.../branches/lighttpd-1.4.x) (revision 2043)
81 ds = (data_string *)con->response.headers->data[i];
83 if (ds->value->used && ds->key->used &&
84 - 0 != strncmp(ds->key->ptr, "X-LIGHTTPD-", sizeof("X-LIGHTTPD-") - 1)) {
85 + 0 != strncmp(ds->key->ptr, "X-LIGHTTPD-", sizeof("X-LIGHTTPD-") - 1) &&
86 + 0 != strncmp(ds->key->ptr, "X-Sendfile", sizeof("X-Sendfile") - 1)) {
87 if (buffer_is_equal_string(ds->key, CONST_STR_LEN("Date"))) have_date = 1;
88 if (buffer_is_equal_string(ds->key, CONST_STR_LEN("Server"))) have_server = 1;
91 buffer_copy_string_buffer(con->uri.authority, con->request.http_host);
92 buffer_to_lower(con->uri.authority);
94 + config_patch_connection(srv, con, COMP_HTTP_SCHEME); /* Scheme: */
95 config_patch_connection(srv, con, COMP_HTTP_HOST); /* Host: */
96 config_patch_connection(srv, con, COMP_HTTP_REMOTEIP); /* Client-IP */
97 config_patch_connection(srv, con, COMP_HTTP_REFERER); /* Referer: */
98 Index: src/mod_proxy.c
99 ===================================================================
100 --- src/mod_proxy.c (.../tags/lighttpd-1.4.18) (revision 2043)
101 +++ src/mod_proxy.c (.../branches/lighttpd-1.4.x) (revision 2043)
102 @@ -1093,15 +1093,17 @@
103 if (s_len < ct_len) continue;
105 /* check extension in the form "/proxy_pattern" */
106 - if (*(extension->key->ptr) == '/' && strncmp(fn->ptr, extension->key->ptr, ct_len) == 0) {
107 - if (s_len > ct_len + 1) {
109 + if (*(extension->key->ptr) == '/') {
110 + if (strncmp(fn->ptr, extension->key->ptr, ct_len) == 0) {
111 + if (s_len > ct_len + 1) {
114 - if (0 != (pi_offset = strchr(fn->ptr + ct_len + 1, '/'))) {
115 - path_info_offset = pi_offset - fn->ptr;
116 + if (0 != (pi_offset = strchr(fn->ptr + ct_len + 1, '/'))) {
117 + path_info_offset = pi_offset - fn->ptr;
123 } else if (0 == strncmp(fn->ptr + s_len - ct_len, extension->key->ptr, ct_len)) {
124 /* check extension in the form ".fcg" */
126 Index: src/Makefile.am
127 ===================================================================
128 --- src/Makefile.am (.../tags/lighttpd-1.4.18) (revision 2043)
129 +++ src/Makefile.am (.../branches/lighttpd-1.4.x) (revision 2043)
133 noinst_HEADERS = $(hdr)
134 -EXTRA_DIST = mod_skeleton.c configparser.y mod_ssi_exprparser.y lempar.c
135 +EXTRA_DIST = mod_skeleton.c configparser.y mod_ssi_exprparser.y lempar.c SConscript
136 Index: src/configparser.y
137 ===================================================================
138 --- src/configparser.y (.../tags/lighttpd-1.4.18) (revision 2043)
139 +++ src/configparser.y (.../branches/lighttpd-1.4.x) (revision 2043)
141 { COMP_HTTP_COOKIE, CONST_STR_LEN("HTTP[\"cookie\"]" ) },
142 { COMP_HTTP_REMOTEIP, CONST_STR_LEN("HTTP[\"remoteip\"]" ) },
143 { COMP_HTTP_QUERYSTRING, CONST_STR_LEN("HTTP[\"querystring\"]") },
144 + { COMP_HTTP_SCHEME, CONST_STR_LEN("HTTP[\"scheme\"]" ) },
145 { COMP_UNSET, NULL, 0 },
148 Index: src/spawn-fcgi.c
149 ===================================================================
150 --- src/spawn-fcgi.c (.../tags/lighttpd-1.4.18) (revision 2043)
151 +++ src/spawn-fcgi.c (.../branches/lighttpd-1.4.x) (revision 2043)
156 -int fcgi_spawn_connection(char *appPath, char *addr, unsigned short port, const char *unixsocket, int child_count, int pid_fd, int nofork) {
157 +int fcgi_spawn_connection(char *appPath, char **appArgv, char *addr, unsigned short port, const char *unixsocket, int child_count, int pid_fd, int nofork) {
159 int socket_type, status;
160 struct timeval tv = { 0, 100 * 1000 };
161 @@ -137,11 +137,10 @@
169 - /* is save as we limit to 256 childs */
170 + /* is safe as we limit to 256 childs */
171 sprintf(cgi_childs, "PHP_FCGI_CHILDREN=%d", child_count);
173 if(fcgi_fd != FCGI_LISTENSOCK_FILENO) {
174 @@ -160,13 +159,18 @@
177 /* fork and replace shell */
178 - b = malloc(strlen("exec ") + strlen(appPath) + 1);
179 - strcpy(b, "exec ");
180 - strcat(b, appPath);
182 + execv(appArgv[0], appArgv);
185 - execl("/bin/sh", "sh", "-c", b, (char *)NULL);
187 + char *b = malloc(strlen("exec ") + strlen(appPath) + 1);
188 + strcpy(b, "exec ");
189 + strcat(b, appPath);
192 + execl("/bin/sh", "sh", "-c", b, (char *)NULL);
202 - char *b = "spawn-fcgi" "-" PACKAGE_VERSION \
203 -" - spawns fastcgi processes\n" \
206 +"Usage: spawn-fcgi [options] -- <fcgiapp> [fcgi app arguments]\n" \
208 +"spawn-fcgi v" PACKAGE_VERSION " - spawns fastcgi processes\n" \
211 " -f <fcgiapp> filename of the fcgi-application\n" \
212 " -a <addr> bind to ip address\n" \
213 " -p <port> bind to tcp-port\n" \
215 char *fcgi_app = NULL, *changeroot = NULL, *username = NULL,
216 *groupname = NULL, *unixsocket = NULL, *pid_file = NULL,
218 + char **fcgi_app_argv = { NULL };
219 unsigned short port = 0;
224 i_am_root = (getuid() == 0);
226 - while(-1 != (o = getopt(argc, argv, "c:f:g:hna:p:u:vC:s:P:"))) {
227 + while(-1 != (o = getopt(argc, argv, "c:f:g:hna:p:u:vC:s:P:"))) {
229 case 'f': fcgi_app = optarg; break;
230 case 'a': addr = optarg;/* ip addr */ break;
235 - if (fcgi_app == NULL || (port == 0 && unixsocket == NULL)) {
236 + if (optind < argc) {
237 + fcgi_app_argv = &argv[optind];
240 + if ((fcgi_app == NULL && fcgi_app_argv == NULL) || (port == 0 && unixsocket == NULL)) {
249 + * Change group before chroot, when we have access
253 + setgid(grp->gr_gid);
254 + setgroups(0, NULL);
256 + initgroups(username, grp->gr_gid);
261 if (-1 == chroot(changeroot)) {
262 fprintf(stderr, "%s.%d: %s %s\n",
263 @@ -420,18 +444,12 @@
266 /* drop root privs */
268 - setgid(grp->gr_gid);
272 - initgroups(username, grp->gr_gid);
278 - return fcgi_spawn_connection(fcgi_app, addr, port, unixsocket, child_count, pid_fd, nofork);
279 + return fcgi_spawn_connection(fcgi_app, fcgi_app_argv, addr, port, unixsocket, child_count, pid_fd, nofork);
283 Index: src/mod_auth.c
284 ===================================================================
285 --- src/mod_auth.c (.../tags/lighttpd-1.4.18) (revision 2043)
286 +++ src/mod_auth.c (.../branches/lighttpd-1.4.x) (revision 2043)
287 @@ -238,13 +238,13 @@
288 int auth_type_len = auth_realm - http_authorization;
290 if ((auth_type_len == 5) &&
291 - (0 == strncmp(http_authorization, "Basic", auth_type_len))) {
292 + (0 == strncasecmp(http_authorization, "Basic", auth_type_len))) {
294 if (0 == strcmp(method->value->ptr, "basic")) {
295 auth_satisfied = http_auth_basic_check(srv, con, p, req, con->uri.path, auth_realm+1);
297 } else if ((auth_type_len == 6) &&
298 - (0 == strncmp(http_authorization, "Digest", auth_type_len))) {
299 + (0 == strncasecmp(http_authorization, "Digest", auth_type_len))) {
300 if (0 == strcmp(method->value->ptr, "digest")) {
301 if (-1 == (auth_satisfied = http_auth_digest_check(srv, con, p, req, con->uri.path, auth_realm+1))) {
302 con->http_status = 400;
303 Index: src/mod_fastcgi.c
304 ===================================================================
305 --- src/mod_fastcgi.c (.../tags/lighttpd-1.4.18) (revision 2043)
306 +++ src/mod_fastcgi.c (.../branches/lighttpd-1.4.x) (revision 2043)
308 * if host is one of the local IP adresses the
309 * whole connection is local
311 - * if tcp/ip should be used host AND port have
313 + * if port is not 0, and host is not specified,
314 + * "localhost" (INADDR_LOOPBACK) is assumed.
318 @@ -823,12 +823,12 @@
319 fcgi_addr_in.sin_family = AF_INET;
321 if (buffer_is_empty(host->host)) {
322 - fcgi_addr_in.sin_addr.s_addr = htonl(INADDR_ANY);
323 + fcgi_addr_in.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
327 /* set a useful default */
328 - fcgi_addr_in.sin_addr.s_addr = htonl(INADDR_ANY);
329 + fcgi_addr_in.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
332 if (NULL == (he = gethostbyname(host->host->ptr))) {
334 fcgi_addr = (struct sockaddr *) &fcgi_addr_in;
336 buffer_copy_string(proc->connection_name, "tcp:");
337 - buffer_append_string_buffer(proc->connection_name, host->host);
338 + if (!buffer_is_empty(host->host)) {
339 + buffer_append_string_buffer(proc->connection_name, host->host);
341 + buffer_append_string(proc->connection_name, "localhost");
343 buffer_append_string(proc->connection_name, ":");
344 buffer_append_long(proc->connection_name, proc->port);
346 @@ -1687,12 +1691,16 @@
349 fcgi_addr_in.sin_family = AF_INET;
350 - if (0 == inet_aton(host->host->ptr, &(fcgi_addr_in.sin_addr))) {
351 - log_error_write(srv, __FILE__, __LINE__, "sbs",
352 - "converting IP address failed for", host->host,
353 - "\nBe sure to specify an IP address here");
356 + if (!buffer_is_empty(host->host)) {
357 + if (0 == inet_aton(host->host->ptr, &(fcgi_addr_in.sin_addr))) {
358 + log_error_write(srv, __FILE__, __LINE__, "sbs",
359 + "converting IP address failed for", host->host,
360 + "\nBe sure to specify an IP address here");
365 + fcgi_addr_in.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
367 fcgi_addr_in.sin_port = htons(proc->port);
368 servlen = sizeof(fcgi_addr_in);
369 @@ -1702,7 +1710,11 @@
370 if (buffer_is_empty(proc->connection_name)) {
371 /* on remote spawing we have to set the connection-name now */
372 buffer_copy_string(proc->connection_name, "tcp:");
373 - buffer_append_string_buffer(proc->connection_name, host->host);
374 + if (!buffer_is_empty(host->host)) {
375 + buffer_append_string_buffer(proc->connection_name, host->host);
377 + buffer_append_string(proc->connection_name, "localhost");
379 buffer_append_string(proc->connection_name, ":");
380 buffer_append_long(proc->connection_name, proc->port);
382 @@ -2530,15 +2542,28 @@
385 if (host->allow_xsendfile &&
386 - NULL != (ds = (data_string *) array_get_element(con->response.headers, "X-LIGHTTPD-send-file"))) {
387 + (NULL != (ds = (data_string *) array_get_element(con->response.headers, "X-LIGHTTPD-send-file"))
388 + || NULL != (ds = (data_string *) array_get_element(con->response.headers, "X-Sendfile")))) {
389 stat_cache_entry *sce;
391 if (HANDLER_ERROR != stat_cache_get_entry(srv, con, ds->value, &sce)) {
392 + data_string *dcls = data_string_init();
395 http_chunk_append_file(srv, con, ds->value, 0, sce->st.st_size);
396 hctx->send_content_body = 0; /* ignore the content */
397 joblist_append(srv, con);
399 + buffer_copy_string_len(dcls->key, "Content-Length", sizeof("Content-Length")-1);
400 + buffer_copy_long(dcls->value, sce->st.st_size);
401 + dcls = (data_string*) array_replace(con->response.headers, (data_unset *)dcls);
402 + if (dcls) dcls->free((data_unset*)dcls);
404 + con->parsed_response |= HTTP_CONTENT_LENGTH;
405 + con->response.content_length = sce->st.st_size;
407 + log_error_write(srv, __FILE__, __LINE__, "sb",
408 + "send-file error: couldn't get stat_cache entry for:",
413 @@ -2719,9 +2744,14 @@
421 + * - tcp socket (do not check host->host->uses, as it may be not set which means INADDR_LOOPBACK)
425 - ((!host->host->used || !host->port) && !host->unixsocket->used)) {
426 + (!host->port && !host->unixsocket->used)) {
427 log_error_write(srv, __FILE__, __LINE__, "sxddd",
430 @@ -3456,8 +3486,9 @@
431 if (s_len < ct_len) continue;
433 /* check extension in the form "/fcgi_pattern" */
434 - if (*(extension->key->ptr) == '/' && strncmp(fn->ptr, extension->key->ptr, ct_len) == 0) {
436 + if (*(extension->key->ptr) == '/') {
437 + if (strncmp(fn->ptr, extension->key->ptr, ct_len) == 0)
439 } else if (0 == strncmp(fn->ptr + s_len - ct_len, extension->key->ptr, ct_len)) {
440 /* check extension in the form ".fcg" */
442 @@ -3473,7 +3504,7 @@
443 for (k = 0; k < extension->used; k++) {
444 host = extension->hosts[k];
446 - /* we should have at least one proc that can do somthing */
447 + /* we should have at least one proc that can do something */
448 if (host->active_procs == 0) {
452 ===================================================================
453 --- src/server.c (.../tags/lighttpd-1.4.18) (revision 2043)
454 +++ src/server.c (.../branches/lighttpd-1.4.x) (revision 2043)
461 + * Change group before chroot, when we have access
464 + if (srv->srvconf.groupname->used) {
465 + setgid(grp->gr_gid);
466 + setgroups(0, NULL);
467 + if (srv->srvconf.username->used) {
468 + initgroups(srv->srvconf.username->ptr, grp->gr_gid);
473 if (srv->srvconf.changeroot->used) {
478 /* drop root privs */
479 - if (srv->srvconf.groupname->used) {
480 - setgid(grp->gr_gid);
481 - setgroups(0, NULL);
484 if (srv->srvconf.username->used) {
485 - if (srv->srvconf.groupname->used) {
486 - initgroups(srv->srvconf.username->ptr, grp->gr_gid);
491 Index: tests/mod-access.t
492 ===================================================================
493 --- tests/mod-access.t (.../tags/lighttpd-1.4.18) (revision 2043)
494 +++ tests/mod-access.t (.../branches/lighttpd-1.4.x) (revision 2043)
498 - # add current source dir to the include-path
499 - # we need this for make distcheck
500 - (my $srcdir = $0) =~ s#/[^/]+$#/#;
501 - unshift @INC, $srcdir;
502 + # add current source dir to the include-path
503 + # we need this for make distcheck
504 + (my $srcdir = $0) =~ s,/[^/]+$,/,;
505 + unshift @INC, $srcdir;
509 Index: tests/mod-auth.t
510 ===================================================================
511 --- tests/mod-auth.t (.../tags/lighttpd-1.4.18) (revision 2043)
512 +++ tests/mod-auth.t (.../branches/lighttpd-1.4.x) (revision 2043)
516 - # add current source dir to the include-path
517 - # we need this for make distcheck
518 - (my $srcdir = $0) =~ s#/[^/]+$#/#;
519 - unshift @INC, $srcdir;
520 + # add current source dir to the include-path
521 + # we need this for make distcheck
522 + (my $srcdir = $0) =~ s,/[^/]+$,/,;
523 + unshift @INC, $srcdir;
528 -use Test::More tests => 13;
529 +use Test::More tests => 14;
532 my $tf = LightyTest->new();
534 $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
535 ok($tf->handle_http($t) == 0, 'Basic-Auth: Valid Auth-token - htpasswd (des)');
537 +$t->{REQUEST} = ( <<EOF
538 +GET /server-config HTTP/1.0
539 +Host: auth-htpasswd.example.org
540 +Authorization: basic ZGVzOmRlcw==
543 +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
544 +ok($tf->handle_http($t) == 0, 'Basic-Auth: Valid Auth-token - htpasswd (des) (lowercase)');
548 skip "no md5 for crypt under cygwin", 1 if $^O eq 'cygwin';
549 $t->{REQUEST} = ( <<EOF
550 Index: tests/mod-secdownload.t
551 ===================================================================
552 Index: tests/core-response.t
553 ===================================================================
554 --- tests/core-response.t (.../tags/lighttpd-1.4.18) (revision 2043)
555 +++ tests/core-response.t (.../branches/lighttpd-1.4.x) (revision 2043)
560 - # add current source dir to the include-path
561 - # we need this for make distcheck
562 - (my $srcdir = $0) =~ s#/[^/]+$#/#;
563 - unshift @INC, $srcdir;
564 + # add current source dir to the include-path
565 + # we need this for make distcheck
566 + (my $srcdir = $0) =~ s,/[^/]+$,/,;
567 + unshift @INC, $srcdir;
571 Index: tests/symlink.t
572 ===================================================================
573 Index: tests/request.t
574 ===================================================================
575 --- tests/request.t (.../tags/lighttpd-1.4.18) (revision 2043)
576 +++ tests/request.t (.../branches/lighttpd-1.4.x) (revision 2043)
580 - # add current source dir to the include-path
581 - # we need this for make distcheck
582 - (my $srcdir = $0) =~ s#/[^/]+$#/#;
583 - unshift @INC, $srcdir;
584 + # add current source dir to the include-path
585 + # we need this for make distcheck
586 + (my $srcdir = $0) =~ s,/[^/]+$,/,;
587 + unshift @INC, $srcdir;
591 Index: tests/mod-userdir.t
592 ===================================================================
593 --- tests/mod-userdir.t (.../tags/lighttpd-1.4.18) (revision 2043)
594 +++ tests/mod-userdir.t (.../branches/lighttpd-1.4.x) (revision 2043)
598 - # add current source dir to the include-path
599 - # we need this for make distcheck
600 - (my $srcdir = $0) =~ s#/[^/]+$#/#;
601 - unshift @INC, $srcdir;
602 + # add current source dir to the include-path
603 + # we need this for make distcheck
604 + (my $srcdir = $0) =~ s,/[^/]+$,/,;
605 + unshift @INC, $srcdir;
609 Index: tests/core-keepalive.t
610 ===================================================================
611 --- tests/core-keepalive.t (.../tags/lighttpd-1.4.18) (revision 2043)
612 +++ tests/core-keepalive.t (.../branches/lighttpd-1.4.x) (revision 2043)
617 - # add current source dir to the include-path
618 - # we need this for make distcheck
619 - (my $srcdir = $0) =~ s#/[^/]+$#/#;
620 - unshift @INC, $srcdir;
621 + # add current source dir to the include-path
622 + # we need this for make distcheck
623 + (my $srcdir = $0) =~ s,/[^/]+$,/,;
624 + unshift @INC, $srcdir;
628 Index: tests/env-variables.t
629 ===================================================================
630 Index: tests/mod-proxy.t
631 ===================================================================
632 Index: tests/core-var-include.t
633 ===================================================================
634 --- tests/core-var-include.t (.../tags/lighttpd-1.4.18) (revision 2043)
635 +++ tests/core-var-include.t (.../branches/lighttpd-1.4.x) (revision 2043)
639 - # add current source dir to the include-path
640 - # we need this for make distcheck
641 - (my $srcdir = $0) =~ s#/[^/]+$#/#;
642 - unshift @INC, $srcdir;
643 + # add current source dir to the include-path
644 + # we need this for make distcheck
645 + (my $srcdir = $0) =~ s,/[^/]+$,/,;
646 + unshift @INC, $srcdir;
650 Index: tests/core-request.t
651 ===================================================================
652 --- tests/core-request.t (.../tags/lighttpd-1.4.18) (revision 2043)
653 +++ tests/core-request.t (.../branches/lighttpd-1.4.x) (revision 2043)
657 - # add current source dir to the include-path
658 - # we need this for make distcheck
659 - (my $srcdir = $0) =~ s#/[^/]+$#/#;
660 - unshift @INC, $srcdir;
661 + # add current source dir to the include-path
662 + # we need this for make distcheck
663 + (my $srcdir = $0) =~ s,/[^/]+$,/,;
664 + unshift @INC, $srcdir;
668 Index: tests/mod-redirect.t
669 ===================================================================
670 --- tests/mod-redirect.t (.../tags/lighttpd-1.4.18) (revision 2043)
671 +++ tests/mod-redirect.t (.../branches/lighttpd-1.4.x) (revision 2043)
675 - # add current source dir to the include-path
676 - # we need this for make distcheck
677 - (my $srcdir = $0) =~ s#/[^/]+$#/#;
678 - unshift @INC, $srcdir;
679 + # add current source dir to the include-path
680 + # we need this for make distcheck
681 + (my $srcdir = $0) =~ s,/[^/]+$,/,;
682 + unshift @INC, $srcdir;
686 Index: tests/mod-cgi.t
687 ===================================================================
688 --- tests/mod-cgi.t (.../tags/lighttpd-1.4.18) (revision 2043)
689 +++ tests/mod-cgi.t (.../branches/lighttpd-1.4.x) (revision 2043)
693 - # add current source dir to the include-path
694 - # we need this for make distcheck
695 - (my $srcdir = $0) =~ s#/[^/]+$#/#;
696 - unshift @INC, $srcdir;
697 + # add current source dir to the include-path
698 + # we need this for make distcheck
699 + (my $srcdir = $0) =~ s,/[^/]+$,/,;
700 + unshift @INC, $srcdir;
704 Index: tests/mod-setenv.t
705 ===================================================================
706 --- tests/mod-setenv.t (.../tags/lighttpd-1.4.18) (revision 2043)
707 +++ tests/mod-setenv.t (.../branches/lighttpd-1.4.x) (revision 2043)
712 - # add current source dir to the include-path
713 - # we need this for make distcheck
714 - (my $srcdir = $0) =~ s#/[^/]+$#/#;
715 - unshift @INC, $srcdir;
716 + # add current source dir to the include-path
717 + # we need this for make distcheck
718 + (my $srcdir = $0) =~ s,/[^/]+$,/,;
719 + unshift @INC, $srcdir;
723 Index: tests/cachable.t
724 ===================================================================
725 --- tests/cachable.t (.../tags/lighttpd-1.4.18) (revision 2043)
726 +++ tests/cachable.t (.../branches/lighttpd-1.4.x) (revision 2043)
730 - # add current source dir to the include-path
731 - # we need this for make distcheck
732 - (my $srcdir = $0) =~ s#/[^/]+$#/#;
733 - unshift @INC, $srcdir;
734 + # add current source dir to the include-path
735 + # we need this for make distcheck
736 + (my $srcdir = $0) =~ s,/[^/]+$,/,;
737 + unshift @INC, $srcdir;
741 Index: tests/lowercase.t
742 ===================================================================
743 --- tests/lowercase.t (.../tags/lighttpd-1.4.18) (revision 2043)
744 +++ tests/lowercase.t (.../branches/lighttpd-1.4.x) (revision 2043)
748 - # add current source dir to the include-path
749 - # we need this for make distcheck
750 - (my $srcdir = $0) =~ s#/[^/]+$#/#;
751 - unshift @INC, $srcdir;
752 + # add current source dir to the include-path
753 + # we need this for make distcheck
754 + (my $srcdir = $0) =~ s,/[^/]+$,/,;
755 + unshift @INC, $srcdir;
760 ===================================================================
761 --- tests/core.t (.../tags/lighttpd-1.4.18) (revision 2043)
762 +++ tests/core.t (.../branches/lighttpd-1.4.x) (revision 2043)
767 - # add current source dir to the include-path
768 - # we need this for make distcheck
769 - (my $srcdir = $0) =~ s#/[^/]+$#/#;
770 - unshift @INC, $srcdir;
771 + # add current source dir to the include-path
772 + # we need this for make distcheck
773 + (my $srcdir = $0) =~ s,/[^/]+$,/,;
774 + unshift @INC, $srcdir;
778 Index: tests/mod-fastcgi.t
779 ===================================================================
780 --- tests/mod-fastcgi.t (.../tags/lighttpd-1.4.18) (revision 2043)
781 +++ tests/mod-fastcgi.t (.../branches/lighttpd-1.4.x) (revision 2043)
785 - # add current source dir to the include-path
786 - # we need this for make distcheck
787 - (my $srcdir = $0) =~ s#/[^/]+$#/#;
788 - unshift @INC, $srcdir;
789 + # add current source dir to the include-path
790 + # we need this for make distcheck
791 + (my $srcdir = $0) =~ s,/[^/]+$,/,;
792 + unshift @INC, $srcdir;
796 Index: tests/mod-rewrite.t
797 ===================================================================
798 --- tests/mod-rewrite.t (.../tags/lighttpd-1.4.18) (revision 2043)
799 +++ tests/mod-rewrite.t (.../branches/lighttpd-1.4.x) (revision 2043)
803 - # add current source dir to the include-path
804 - # we need this for make distcheck
805 - (my $srcdir = $0) =~ s#/[^/]+$#/#;
806 - unshift @INC, $srcdir;
807 + # add current source dir to the include-path
808 + # we need this for make distcheck
809 + (my $srcdir = $0) =~ s,/[^/]+$,/,;
810 + unshift @INC, $srcdir;
814 Index: tests/Makefile.am
815 ===================================================================
816 --- tests/Makefile.am (.../tags/lighttpd-1.4.18) (revision 2043)
817 +++ tests/Makefile.am (.../branches/lighttpd-1.4.x) (revision 2043)
824 + mod-secdownload.t \
835 + env-variables.conf \
845 TESTS_ENVIRONMENT=$(srcdir)/wrapper.sh $(srcdir) $(top_builddir)
847 EXTRA_DIST=wrapper.sh lighttpd.conf \
854 Index: tests/core-404-handler.t
855 ===================================================================
856 --- tests/core-404-handler.t (.../tags/lighttpd-1.4.18) (revision 2043)
857 +++ tests/core-404-handler.t (.../branches/lighttpd-1.4.x) (revision 2043)
859 # returning no status -> 200
862 - # add current source dir to the include-path
863 - # we need this for make distcheck
864 - (my $srcdir = $0) =~ s#/[^/]+$#/#;
865 - unshift @INC, $srcdir;
866 + # add current source dir to the include-path
867 + # we need this for make distcheck
868 + (my $srcdir = $0) =~ s,/[^/]+$,/,;
869 + unshift @INC, $srcdir;
873 Index: tests/mod-compress.t
874 ===================================================================
875 --- tests/mod-compress.t (.../tags/lighttpd-1.4.18) (revision 2043)
876 +++ tests/mod-compress.t (.../branches/lighttpd-1.4.x) (revision 2043)
880 - # add current source dir to the include-path
881 - # we need this for make distcheck
882 - (my $srcdir = $0) =~ s#/[^/]+$#/#;
883 - unshift @INC, $srcdir;
884 + # add current source dir to the include-path
885 + # we need this for make distcheck
886 + (my $srcdir = $0) =~ s,/[^/]+$,/,;
887 + unshift @INC, $srcdir;
891 Index: tests/mod-ssi.t
892 ===================================================================
893 --- tests/mod-ssi.t (.../tags/lighttpd-1.4.18) (revision 2043)
894 +++ tests/mod-ssi.t (.../branches/lighttpd-1.4.x) (revision 2043)
898 - # add current source dir to the include-path
899 - # we need this for make distcheck
900 - (my $srcdir = $0) =~ s#/[^/]+$#/#;
901 - unshift @INC, $srcdir;
902 + # add current source dir to the include-path
903 + # we need this for make distcheck
904 + (my $srcdir = $0) =~ s,/[^/]+$,/,;
905 + unshift @INC, $srcdir;
909 Index: tests/core-condition.t
910 ===================================================================
911 --- tests/core-condition.t (.../tags/lighttpd-1.4.18) (revision 2043)
912 +++ tests/core-condition.t (.../branches/lighttpd-1.4.x) (revision 2043)
916 - # add current source dir to the include-path
917 - # we need this for make distcheck
918 - (my $srcdir = $0) =~ s#/[^/]+$#/#;
919 - unshift @INC, $srcdir;
920 + # add current source dir to the include-path
921 + # we need this for make distcheck
922 + (my $srcdir = $0) =~ s,/[^/]+$,/,;
923 + unshift @INC, $srcdir;
927 Index: doc/configuration.txt
928 ===================================================================
929 --- doc/configuration.txt (.../tags/lighttpd-1.4.18) (revision 2043)
930 +++ doc/configuration.txt (.../branches/lighttpd-1.4.x) (revision 2043)
941 ===================================================================
943 ===================================================================
944 --- Makefile.am (.../tags/lighttpd-1.4.18) (revision 2043)
945 +++ Makefile.am (.../branches/lighttpd-1.4.x) (revision 2043)
947 SUBDIRS=src doc tests cygwin openwrt
949 -EXTRA_DIST=lighttpd.spec
950 +EXTRA_DIST=lighttpd.spec autogen.sh SConstruct
952 ===================================================================
953 --- NEWS (.../tags/lighttpd-1.4.18) (revision 2043)
954 +++ NEWS (.../branches/lighttpd-1.4.x) (revision 2043)
961 + * added support for If-Range: <date> (#1346)
962 + * added support for matching $HTTP["scheme"] in configs
963 + * fixed initgroups() called after chroot (#1384)
964 + * fixed case-sensitive check for Auth-Method (#1456)
965 + * execute fcgi app without /bin/sh if used as argument to spawn-fcgi (#1428)
966 + * fixed a bug that made /-prefixed extensions being handled also when
967 + matching the end of the uri in fcgi,scgi and proxy modules (#1489)
968 + * print error if X-LIGHTTPD-send-file cannot be done; reset header
969 + Content-Length for send-file. Patches by Stefan Buhler
970 + * prevent crash in certain php-fcgi configurations (#841)
972 - 1.4.18 - 2007-09-09
974 * fixed compile error on IRIX 6.5.x on prctl() (#1333)
975 Index: lighttpd.spec.in
976 ===================================================================
977 --- lighttpd.spec.in (.../tags/lighttpd-1.4.18) (revision 2043)
978 +++ lighttpd.spec.in (.../branches/lighttpd-1.4.x) (revision 2043)
980 Packager: Jan Kneschke <jan@kneschke.de>
982 Group: Networking/Daemons
983 -URL: http://jan.kneschke.de/projects/lighttpd/
984 +URL: http://www.lighttpd.net/
985 Requires: pcre >= 3.1 zlib
986 -BuildPrereq: libtool zlib-devel
987 +BuildRequires: libtool zlib-devel
988 BuildRoot: %{_tmppath}/%{name}-root
992 lighttpd is intented to be a frontend for ad-servers which have to deliver
993 small files concurrently to many connections.
995 -Available rpmbuild rebuild options :
996 ---with : ssl mysql lua memcache
997 +Available rpmbuild rebuild options:
998 +--with: ssl mysql lua memcache
1012 mkdir -p %{buildroot}%{_sysconfdir}/{init.d,sysconfig}
1013 -if test -f /etc/redhat-release -o -f /etc/fedora-release; then
1014 - install -m 755 doc/rc.lighttpd.redhat %{buildroot}%{_sysconfdir}/init.d/lighttpd
1015 +if [ -f /etc/redhat-release -o -f /etc/fedora-release ]; then
1016 + install -m 755 doc/rc.lighttpd.redhat %{buildroot}%{_sysconfdir}/init.d/lighttpd
1018 - install -m 755 doc/rc.lighttpd %{buildroot}%{_sysconfdir}/init.d/lighttpd
1019 + install -m 755 doc/rc.lighttpd %{buildroot}%{_sysconfdir}/init.d/lighttpd
1021 install -m 644 doc/sysconfig.lighttpd %{buildroot}%{_sysconfdir}/sysconfig/lighttpd
1026 ## read http://www.fedora.us/docs/spec.html next time :)
1027 -if test "$1" = "1"; then
1028 - # real install, not upgrade
1029 - /sbin/chkconfig --add lighttpd
1030 +if [ "$1" = "1" ]; then
1031 + # real install, not upgrade
1032 + /sbin/chkconfig --add lighttpd
1036 -if test "$1" = "0"; then
1037 - # real uninstall, not upgrade
1038 - %{_sysconfdir}/init.d/lighttpd stop
1039 - /sbin/chkconfig --del lighttpd
1040 +if [ "$1" = "0"]; then
1041 + # real uninstall, not upgrade
1042 + %{_sysconfdir}/init.d/lighttpd stop
1043 + /sbin/chkconfig --del lighttpd