2 ===================================================================
3 Index: src/configfile-glue.c
4 ===================================================================
5 --- src/configfile-glue.c (.../tags/lighttpd-1.4.18) (revision 2039)
6 +++ src/configfile-glue.c (.../branches/lighttpd-1.4.x) (revision 2039)
11 + case COMP_HTTP_SCHEME:
12 + l = con->uri.scheme;
19 ===================================================================
20 --- src/array.h (.../tags/lighttpd-1.4.18) (revision 2039)
21 +++ src/array.h (.../branches/lighttpd-1.4.x) (revision 2039)
25 COMP_HTTP_QUERYSTRING,
30 Index: src/mod_staticfile.c
31 ===================================================================
32 --- src/mod_staticfile.c (.../tags/lighttpd-1.4.18) (revision 2039)
33 +++ src/mod_staticfile.c (.../branches/lighttpd-1.4.x) (revision 2039)
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 2039)
63 +++ src/mod_scgi.c (.../branches/lighttpd-1.4.x) (revision 2039)
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 2039)
79 +++ src/response.c (.../branches/lighttpd-1.4.x) (revision 2039)
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 2039)
101 +++ src/mod_proxy.c (.../branches/lighttpd-1.4.x) (revision 2039)
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/configparser.y
127 ===================================================================
128 --- src/configparser.y (.../tags/lighttpd-1.4.18) (revision 2039)
129 +++ src/configparser.y (.../branches/lighttpd-1.4.x) (revision 2039)
131 { COMP_HTTP_COOKIE, CONST_STR_LEN("HTTP[\"cookie\"]" ) },
132 { COMP_HTTP_REMOTEIP, CONST_STR_LEN("HTTP[\"remoteip\"]" ) },
133 { COMP_HTTP_QUERYSTRING, CONST_STR_LEN("HTTP[\"querystring\"]") },
134 + { COMP_HTTP_SCHEME, CONST_STR_LEN("HTTP[\"scheme\"]" ) },
135 { COMP_UNSET, NULL, 0 },
138 Index: src/spawn-fcgi.c
139 ===================================================================
140 --- src/spawn-fcgi.c (.../tags/lighttpd-1.4.18) (revision 2039)
141 +++ src/spawn-fcgi.c (.../branches/lighttpd-1.4.x) (revision 2039)
146 -int fcgi_spawn_connection(char *appPath, char *addr, unsigned short port, const char *unixsocket, int child_count, int pid_fd, int nofork) {
147 +int fcgi_spawn_connection(char *appPath, char **appArgv, char *addr, unsigned short port, const char *unixsocket, int child_count, int pid_fd, int nofork) {
149 int socket_type, status;
150 struct timeval tv = { 0, 100 * 1000 };
151 @@ -137,11 +137,10 @@
159 - /* is save as we limit to 256 childs */
160 + /* is safe as we limit to 256 childs */
161 sprintf(cgi_childs, "PHP_FCGI_CHILDREN=%d", child_count);
163 if(fcgi_fd != FCGI_LISTENSOCK_FILENO) {
164 @@ -160,13 +159,18 @@
167 /* fork and replace shell */
168 - b = malloc(strlen("exec ") + strlen(appPath) + 1);
169 - strcpy(b, "exec ");
170 - strcat(b, appPath);
172 + execv(appArgv[0], appArgv);
175 - execl("/bin/sh", "sh", "-c", b, (char *)NULL);
177 + char *b = malloc(strlen("exec ") + strlen(appPath) + 1);
178 + strcpy(b, "exec ");
179 + strcat(b, appPath);
182 + execl("/bin/sh", "sh", "-c", b, (char *)NULL);
192 - char *b = "spawn-fcgi" "-" PACKAGE_VERSION \
193 -" - spawns fastcgi processes\n" \
196 +"Usage: spawn-fcgi [options] -- <fcgiapp> [fcgi app arguments]\n" \
198 +"spawn-fcgi v" PACKAGE_VERSION " - spawns fastcgi processes\n" \
201 " -f <fcgiapp> filename of the fcgi-application\n" \
202 " -a <addr> bind to ip address\n" \
203 " -p <port> bind to tcp-port\n" \
205 char *fcgi_app = NULL, *changeroot = NULL, *username = NULL,
206 *groupname = NULL, *unixsocket = NULL, *pid_file = NULL,
208 + char **fcgi_app_argv = { NULL };
209 unsigned short port = 0;
214 i_am_root = (getuid() == 0);
216 - while(-1 != (o = getopt(argc, argv, "c:f:g:hna:p:u:vC:s:P:"))) {
217 + while(-1 != (o = getopt(argc, argv, "c:f:g:hna:p:u:vC:s:P:"))) {
219 case 'f': fcgi_app = optarg; break;
220 case 'a': addr = optarg;/* ip addr */ break;
225 - if (fcgi_app == NULL || (port == 0 && unixsocket == NULL)) {
226 + if (optind < argc) {
227 + fcgi_app_argv = &argv[optind];
230 + if ((fcgi_app == NULL && fcgi_app_argv == NULL) || (port == 0 && unixsocket == NULL)) {
239 + * Change group before chroot, when we have access
243 + setgid(grp->gr_gid);
244 + setgroups(0, NULL);
246 + initgroups(username, grp->gr_gid);
251 if (-1 == chroot(changeroot)) {
252 fprintf(stderr, "%s.%d: %s %s\n",
253 @@ -420,18 +444,12 @@
256 /* drop root privs */
258 - setgid(grp->gr_gid);
262 - initgroups(username, grp->gr_gid);
268 - return fcgi_spawn_connection(fcgi_app, addr, port, unixsocket, child_count, pid_fd, nofork);
269 + return fcgi_spawn_connection(fcgi_app, fcgi_app_argv, addr, port, unixsocket, child_count, pid_fd, nofork);
273 Index: src/mod_auth.c
274 ===================================================================
275 --- src/mod_auth.c (.../tags/lighttpd-1.4.18) (revision 2039)
276 +++ src/mod_auth.c (.../branches/lighttpd-1.4.x) (revision 2039)
277 @@ -238,13 +238,13 @@
278 int auth_type_len = auth_realm - http_authorization;
280 if ((auth_type_len == 5) &&
281 - (0 == strncmp(http_authorization, "Basic", auth_type_len))) {
282 + (0 == strncasecmp(http_authorization, "Basic", auth_type_len))) {
284 if (0 == strcmp(method->value->ptr, "basic")) {
285 auth_satisfied = http_auth_basic_check(srv, con, p, req, con->uri.path, auth_realm+1);
287 } else if ((auth_type_len == 6) &&
288 - (0 == strncmp(http_authorization, "Digest", auth_type_len))) {
289 + (0 == strncasecmp(http_authorization, "Digest", auth_type_len))) {
290 if (0 == strcmp(method->value->ptr, "digest")) {
291 if (-1 == (auth_satisfied = http_auth_digest_check(srv, con, p, req, con->uri.path, auth_realm+1))) {
292 con->http_status = 400;
293 Index: src/mod_fastcgi.c
294 ===================================================================
295 --- src/mod_fastcgi.c (.../tags/lighttpd-1.4.18) (revision 2039)
296 +++ src/mod_fastcgi.c (.../branches/lighttpd-1.4.x) (revision 2039)
298 * if host is one of the local IP adresses the
299 * whole connection is local
301 - * if tcp/ip should be used host AND port have
303 + * if port is not 0, and host is not specified,
304 + * "localhost" (INADDR_LOOPBACK) is assumed.
308 @@ -823,12 +823,12 @@
309 fcgi_addr_in.sin_family = AF_INET;
311 if (buffer_is_empty(host->host)) {
312 - fcgi_addr_in.sin_addr.s_addr = htonl(INADDR_ANY);
313 + fcgi_addr_in.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
317 /* set a useful default */
318 - fcgi_addr_in.sin_addr.s_addr = htonl(INADDR_ANY);
319 + fcgi_addr_in.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
322 if (NULL == (he = gethostbyname(host->host->ptr))) {
324 fcgi_addr = (struct sockaddr *) &fcgi_addr_in;
326 buffer_copy_string(proc->connection_name, "tcp:");
327 - buffer_append_string_buffer(proc->connection_name, host->host);
328 + if (!buffer_is_empty(host->host)) {
329 + buffer_append_string_buffer(proc->connection_name, host->host);
331 + buffer_append_string(proc->connection_name, "localhost");
333 buffer_append_string(proc->connection_name, ":");
334 buffer_append_long(proc->connection_name, proc->port);
336 @@ -1687,12 +1691,16 @@
339 fcgi_addr_in.sin_family = AF_INET;
340 - if (0 == inet_aton(host->host->ptr, &(fcgi_addr_in.sin_addr))) {
341 - log_error_write(srv, __FILE__, __LINE__, "sbs",
342 - "converting IP address failed for", host->host,
343 - "\nBe sure to specify an IP address here");
346 + if (!buffer_is_empty(host->host)) {
347 + if (0 == inet_aton(host->host->ptr, &(fcgi_addr_in.sin_addr))) {
348 + log_error_write(srv, __FILE__, __LINE__, "sbs",
349 + "converting IP address failed for", host->host,
350 + "\nBe sure to specify an IP address here");
355 + fcgi_addr_in.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
357 fcgi_addr_in.sin_port = htons(proc->port);
358 servlen = sizeof(fcgi_addr_in);
359 @@ -1702,7 +1710,11 @@
360 if (buffer_is_empty(proc->connection_name)) {
361 /* on remote spawing we have to set the connection-name now */
362 buffer_copy_string(proc->connection_name, "tcp:");
363 - buffer_append_string_buffer(proc->connection_name, host->host);
364 + if (!buffer_is_empty(host->host)) {
365 + buffer_append_string_buffer(proc->connection_name, host->host);
367 + buffer_append_string(proc->connection_name, "localhost");
369 buffer_append_string(proc->connection_name, ":");
370 buffer_append_long(proc->connection_name, proc->port);
372 @@ -2530,15 +2542,28 @@
375 if (host->allow_xsendfile &&
376 - NULL != (ds = (data_string *) array_get_element(con->response.headers, "X-LIGHTTPD-send-file"))) {
377 + (NULL != (ds = (data_string *) array_get_element(con->response.headers, "X-LIGHTTPD-send-file"))
378 + || NULL != (ds = (data_string *) array_get_element(con->response.headers, "X-Sendfile")))) {
379 stat_cache_entry *sce;
381 if (HANDLER_ERROR != stat_cache_get_entry(srv, con, ds->value, &sce)) {
382 + data_string *dcls = data_string_init();
385 http_chunk_append_file(srv, con, ds->value, 0, sce->st.st_size);
386 hctx->send_content_body = 0; /* ignore the content */
387 joblist_append(srv, con);
389 + buffer_copy_string_len(dcls->key, "Content-Length", sizeof("Content-Length")-1);
390 + buffer_copy_long(dcls->value, sce->st.st_size);
391 + dcls = (data_string*) array_replace(con->response.headers, (data_unset *)dcls);
392 + if (dcls) dcls->free((data_unset*)dcls);
394 + con->parsed_response |= HTTP_CONTENT_LENGTH;
395 + con->response.content_length = sce->st.st_size;
397 + log_error_write(srv, __FILE__, __LINE__, "sb",
398 + "send-file error: couldn't get stat_cache entry for:",
403 @@ -2719,9 +2744,14 @@
411 + * - tcp socket (do not check host->host->uses, as it may be not set which means INADDR_LOOPBACK)
415 - ((!host->host->used || !host->port) && !host->unixsocket->used)) {
416 + (!host->port && !host->unixsocket->used)) {
417 log_error_write(srv, __FILE__, __LINE__, "sxddd",
420 @@ -3456,8 +3486,9 @@
421 if (s_len < ct_len) continue;
423 /* check extension in the form "/fcgi_pattern" */
424 - if (*(extension->key->ptr) == '/' && strncmp(fn->ptr, extension->key->ptr, ct_len) == 0) {
426 + if (*(extension->key->ptr) == '/') {
427 + if (strncmp(fn->ptr, extension->key->ptr, ct_len) == 0)
429 } else if (0 == strncmp(fn->ptr + s_len - ct_len, extension->key->ptr, ct_len)) {
430 /* check extension in the form ".fcg" */
432 @@ -3473,7 +3504,7 @@
433 for (k = 0; k < extension->used; k++) {
434 host = extension->hosts[k];
436 - /* we should have at least one proc that can do somthing */
437 + /* we should have at least one proc that can do something */
438 if (host->active_procs == 0) {
442 ===================================================================
443 --- src/server.c (.../tags/lighttpd-1.4.18) (revision 2039)
444 +++ src/server.c (.../branches/lighttpd-1.4.x) (revision 2039)
451 + * Change group before chroot, when we have access
454 + if (srv->srvconf.groupname->used) {
455 + setgid(grp->gr_gid);
456 + setgroups(0, NULL);
457 + if (srv->srvconf.username->used) {
458 + initgroups(srv->srvconf.username->ptr, grp->gr_gid);
463 if (srv->srvconf.changeroot->used) {
468 /* drop root privs */
469 - if (srv->srvconf.groupname->used) {
470 - setgid(grp->gr_gid);
471 - setgroups(0, NULL);
474 if (srv->srvconf.username->used) {
475 - if (srv->srvconf.groupname->used) {
476 - initgroups(srv->srvconf.username->ptr, grp->gr_gid);
481 Index: tests/mod-access.t
482 ===================================================================
483 --- tests/mod-access.t (.../tags/lighttpd-1.4.18) (revision 2039)
484 +++ tests/mod-access.t (.../branches/lighttpd-1.4.x) (revision 2039)
488 - # add current source dir to the include-path
489 - # we need this for make distcheck
490 - (my $srcdir = $0) =~ s#/[^/]+$#/#;
491 - unshift @INC, $srcdir;
492 + # add current source dir to the include-path
493 + # we need this for make distcheck
494 + (my $srcdir = $0) =~ s,/[^/]+$,/,;
495 + unshift @INC, $srcdir;
499 Index: tests/mod-auth.t
500 ===================================================================
501 --- tests/mod-auth.t (.../tags/lighttpd-1.4.18) (revision 2039)
502 +++ tests/mod-auth.t (.../branches/lighttpd-1.4.x) (revision 2039)
506 - # add current source dir to the include-path
507 - # we need this for make distcheck
508 - (my $srcdir = $0) =~ s#/[^/]+$#/#;
509 - unshift @INC, $srcdir;
510 + # add current source dir to the include-path
511 + # we need this for make distcheck
512 + (my $srcdir = $0) =~ s,/[^/]+$,/,;
513 + unshift @INC, $srcdir;
518 -use Test::More tests => 13;
519 +use Test::More tests => 14;
522 my $tf = LightyTest->new();
524 $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
525 ok($tf->handle_http($t) == 0, 'Basic-Auth: Valid Auth-token - htpasswd (des)');
527 +$t->{REQUEST} = ( <<EOF
528 +GET /server-config HTTP/1.0
529 +Host: auth-htpasswd.example.org
530 +Authorization: basic ZGVzOmRlcw==
533 +$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
534 +ok($tf->handle_http($t) == 0, 'Basic-Auth: Valid Auth-token - htpasswd (des) (lowercase)');
538 skip "no md5 for crypt under cygwin", 1 if $^O eq 'cygwin';
539 $t->{REQUEST} = ( <<EOF
540 Index: tests/mod-secdownload.t
541 ===================================================================
542 --- tests/mod-secdownload.t (.../tags/lighttpd-1.4.18) (revision 2039)
543 +++ tests/mod-secdownload.t (.../branches/lighttpd-1.4.x) (revision 2039)
547 - # add current source dir to the include-path
548 - # we need this for make distcheck
549 - (my $srcdir = $0) =~ s#/[^/]+$#/#;
550 - unshift @INC, $srcdir;
551 + # add current source dir to the include-path
552 + # we need this for make distcheck
553 + (my $srcdir = $0) =~ s,/[^/]+$,/,;
554 + unshift @INC, $srcdir;
558 Index: tests/core-response.t
559 ===================================================================
560 --- tests/core-response.t (.../tags/lighttpd-1.4.18) (revision 2039)
561 +++ tests/core-response.t (.../branches/lighttpd-1.4.x) (revision 2039)
566 - # add current source dir to the include-path
567 - # we need this for make distcheck
568 - (my $srcdir = $0) =~ s#/[^/]+$#/#;
569 - unshift @INC, $srcdir;
570 + # add current source dir to the include-path
571 + # we need this for make distcheck
572 + (my $srcdir = $0) =~ s,/[^/]+$,/,;
573 + unshift @INC, $srcdir;
577 Index: tests/symlink.t
578 ===================================================================
579 --- tests/symlink.t (.../tags/lighttpd-1.4.18) (revision 2039)
580 +++ tests/symlink.t (.../branches/lighttpd-1.4.x) (revision 2039)
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;
588 + # add current source dir to the include-path
589 + # we need this for make distcheck
590 + (my $srcdir = $0) =~ s,/[^/]+$,/,;
591 + unshift @INC, $srcdir;
595 Index: tests/request.t
596 ===================================================================
597 --- tests/request.t (.../tags/lighttpd-1.4.18) (revision 2039)
598 +++ tests/request.t (.../branches/lighttpd-1.4.x) (revision 2039)
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;
606 + # add current source dir to the include-path
607 + # we need this for make distcheck
608 + (my $srcdir = $0) =~ s,/[^/]+$,/,;
609 + unshift @INC, $srcdir;
613 Index: tests/mod-userdir.t
614 ===================================================================
615 --- tests/mod-userdir.t (.../tags/lighttpd-1.4.18) (revision 2039)
616 +++ tests/mod-userdir.t (.../branches/lighttpd-1.4.x) (revision 2039)
620 - # add current source dir to the include-path
621 - # we need this for make distcheck
622 - (my $srcdir = $0) =~ s#/[^/]+$#/#;
623 - unshift @INC, $srcdir;
624 + # add current source dir to the include-path
625 + # we need this for make distcheck
626 + (my $srcdir = $0) =~ s,/[^/]+$,/,;
627 + unshift @INC, $srcdir;
631 Index: tests/core-keepalive.t
632 ===================================================================
633 --- tests/core-keepalive.t (.../tags/lighttpd-1.4.18) (revision 2039)
634 +++ tests/core-keepalive.t (.../branches/lighttpd-1.4.x) (revision 2039)
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/env-variables.t
651 ===================================================================
652 --- tests/env-variables.t (.../tags/lighttpd-1.4.18) (revision 2039)
653 +++ tests/env-variables.t (.../branches/lighttpd-1.4.x) (revision 2039)
658 - # add current source dir to the include-path
659 - # we need this for make distcheck
660 - (my $srcdir = $0) =~ s#/[^/]+$#/#;
661 - unshift @INC, $srcdir;
662 + # add current source dir to the include-path
663 + # we need this for make distcheck
664 + (my $srcdir = $0) =~ s,/[^/]+$,/,;
665 + unshift @INC, $srcdir;
669 Index: tests/mod-proxy.t
670 ===================================================================
671 --- tests/mod-proxy.t (.../tags/lighttpd-1.4.18) (revision 2039)
672 +++ tests/mod-proxy.t (.../branches/lighttpd-1.4.x) (revision 2039)
676 - # add current source dir to the include-path
677 - # we need this for make distcheck
678 - (my $srcdir = $0) =~ s#/[^/]+$#/#;
679 - unshift @INC, $srcdir;
680 + # add current source dir to the include-path
681 + # we need this for make distcheck
682 + (my $srcdir = $0) =~ s,/[^/]+$,/,;
683 + unshift @INC, $srcdir;
687 Index: tests/core-var-include.t
688 ===================================================================
689 --- tests/core-var-include.t (.../tags/lighttpd-1.4.18) (revision 2039)
690 +++ tests/core-var-include.t (.../branches/lighttpd-1.4.x) (revision 2039)
694 - # add current source dir to the include-path
695 - # we need this for make distcheck
696 - (my $srcdir = $0) =~ s#/[^/]+$#/#;
697 - unshift @INC, $srcdir;
698 + # add current source dir to the include-path
699 + # we need this for make distcheck
700 + (my $srcdir = $0) =~ s,/[^/]+$,/,;
701 + unshift @INC, $srcdir;
705 Index: tests/core-request.t
706 ===================================================================
707 --- tests/core-request.t (.../tags/lighttpd-1.4.18) (revision 2039)
708 +++ tests/core-request.t (.../branches/lighttpd-1.4.x) (revision 2039)
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/mod-redirect.t
724 ===================================================================
725 --- tests/mod-redirect.t (.../tags/lighttpd-1.4.18) (revision 2039)
726 +++ tests/mod-redirect.t (.../branches/lighttpd-1.4.x) (revision 2039)
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/mod-cgi.t
742 ===================================================================
743 --- tests/mod-cgi.t (.../tags/lighttpd-1.4.18) (revision 2039)
744 +++ tests/mod-cgi.t (.../branches/lighttpd-1.4.x) (revision 2039)
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;
759 Index: tests/mod-setenv.t
760 ===================================================================
761 --- tests/mod-setenv.t (.../tags/lighttpd-1.4.18) (revision 2039)
762 +++ tests/mod-setenv.t (.../branches/lighttpd-1.4.x) (revision 2039)
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/cachable.t
779 ===================================================================
780 --- tests/cachable.t (.../tags/lighttpd-1.4.18) (revision 2039)
781 +++ tests/cachable.t (.../branches/lighttpd-1.4.x) (revision 2039)
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/lowercase.t
797 ===================================================================
798 --- tests/lowercase.t (.../tags/lighttpd-1.4.18) (revision 2039)
799 +++ tests/lowercase.t (.../branches/lighttpd-1.4.x) (revision 2039)
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;
815 ===================================================================
816 --- tests/core.t (.../tags/lighttpd-1.4.18) (revision 2039)
817 +++ tests/core.t (.../branches/lighttpd-1.4.x) (revision 2039)
822 - # add current source dir to the include-path
823 - # we need this for make distcheck
824 - (my $srcdir = $0) =~ s#/[^/]+$#/#;
825 - unshift @INC, $srcdir;
826 + # add current source dir to the include-path
827 + # we need this for make distcheck
828 + (my $srcdir = $0) =~ s,/[^/]+$,/,;
829 + unshift @INC, $srcdir;
833 Index: tests/mod-fastcgi.t
834 ===================================================================
835 --- tests/mod-fastcgi.t (.../tags/lighttpd-1.4.18) (revision 2039)
836 +++ tests/mod-fastcgi.t (.../branches/lighttpd-1.4.x) (revision 2039)
840 - # add current source dir to the include-path
841 - # we need this for make distcheck
842 - (my $srcdir = $0) =~ s#/[^/]+$#/#;
843 - unshift @INC, $srcdir;
844 + # add current source dir to the include-path
845 + # we need this for make distcheck
846 + (my $srcdir = $0) =~ s,/[^/]+$,/,;
847 + unshift @INC, $srcdir;
851 Index: tests/mod-rewrite.t
852 ===================================================================
853 --- tests/mod-rewrite.t (.../tags/lighttpd-1.4.18) (revision 2039)
854 +++ tests/mod-rewrite.t (.../branches/lighttpd-1.4.x) (revision 2039)
858 - # add current source dir to the include-path
859 - # we need this for make distcheck
860 - (my $srcdir = $0) =~ s#/[^/]+$#/#;
861 - unshift @INC, $srcdir;
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;
869 Index: tests/core-404-handler.t
870 ===================================================================
871 --- tests/core-404-handler.t (.../tags/lighttpd-1.4.18) (revision 2039)
872 +++ tests/core-404-handler.t (.../branches/lighttpd-1.4.x) (revision 2039)
874 # returning no status -> 200
877 - # add current source dir to the include-path
878 - # we need this for make distcheck
879 - (my $srcdir = $0) =~ s#/[^/]+$#/#;
880 - unshift @INC, $srcdir;
881 + # add current source dir to the include-path
882 + # we need this for make distcheck
883 + (my $srcdir = $0) =~ s,/[^/]+$,/,;
884 + unshift @INC, $srcdir;
888 Index: tests/mod-compress.t
889 ===================================================================
890 --- tests/mod-compress.t (.../tags/lighttpd-1.4.18) (revision 2039)
891 +++ tests/mod-compress.t (.../branches/lighttpd-1.4.x) (revision 2039)
895 - # add current source dir to the include-path
896 - # we need this for make distcheck
897 - (my $srcdir = $0) =~ s#/[^/]+$#/#;
898 - unshift @INC, $srcdir;
899 + # add current source dir to the include-path
900 + # we need this for make distcheck
901 + (my $srcdir = $0) =~ s,/[^/]+$,/,;
902 + unshift @INC, $srcdir;
906 Index: tests/mod-ssi.t
907 ===================================================================
908 --- tests/mod-ssi.t (.../tags/lighttpd-1.4.18) (revision 2039)
909 +++ tests/mod-ssi.t (.../branches/lighttpd-1.4.x) (revision 2039)
913 - # add current source dir to the include-path
914 - # we need this for make distcheck
915 - (my $srcdir = $0) =~ s#/[^/]+$#/#;
916 - unshift @INC, $srcdir;
917 + # add current source dir to the include-path
918 + # we need this for make distcheck
919 + (my $srcdir = $0) =~ s,/[^/]+$,/,;
920 + unshift @INC, $srcdir;
924 Index: tests/core-condition.t
925 ===================================================================
926 --- tests/core-condition.t (.../tags/lighttpd-1.4.18) (revision 2039)
927 +++ tests/core-condition.t (.../branches/lighttpd-1.4.x) (revision 2039)
931 - # add current source dir to the include-path
932 - # we need this for make distcheck
933 - (my $srcdir = $0) =~ s#/[^/]+$#/#;
934 - unshift @INC, $srcdir;
935 + # add current source dir to the include-path
936 + # we need this for make distcheck
937 + (my $srcdir = $0) =~ s,/[^/]+$,/,;
938 + unshift @INC, $srcdir;
942 Index: doc/configuration.txt
943 ===================================================================
944 --- doc/configuration.txt (.../tags/lighttpd-1.4.18) (revision 2039)
945 +++ doc/configuration.txt (.../branches/lighttpd-1.4.x) (revision 2039)
956 ===================================================================
958 ===================================================================
959 --- Makefile.am (.../tags/lighttpd-1.4.18) (revision 2039)
960 +++ Makefile.am (.../branches/lighttpd-1.4.x) (revision 2039)
962 SUBDIRS=src doc tests cygwin openwrt
964 -EXTRA_DIST=lighttpd.spec
965 +EXTRA_DIST=lighttpd.spec SConstruct
967 ===================================================================
968 --- NEWS (.../tags/lighttpd-1.4.18) (revision 2039)
969 +++ NEWS (.../branches/lighttpd-1.4.x) (revision 2039)
976 + * added support for If-Range: <date> (#1346)
977 + * added support for matching $HTTP["scheme"] in configs
978 + * fixed initgroups() called after chroot (#1384)
979 + * fixed case-sensitive check for Auth-Method (#1456)
980 + * execute fcgi app without /bin/sh if used as argument to spawn-fcgi (#1428)
981 + * fixed a bug that made /-prefixed extensions being handled also when
982 + matching the end of the uri in fcgi,scgi and proxy modules (#1489)
983 + * print error if X-LIGHTTPD-send-file cannot be done; reset header
984 + Content-Length for send-file. Patches by Stefan Buhler
985 + * prevent crash in certain php-fcgi configurations (#841)
987 - 1.4.18 - 2007-09-09
989 * fixed compile error on IRIX 6.5.x on prctl() (#1333)
990 Index: lighttpd.spec.in
991 ===================================================================
992 --- lighttpd.spec.in (.../tags/lighttpd-1.4.18) (revision 2039)
993 +++ lighttpd.spec.in (.../branches/lighttpd-1.4.x) (revision 2039)
995 Packager: Jan Kneschke <jan@kneschke.de>
997 Group: Networking/Daemons
998 -URL: http://jan.kneschke.de/projects/lighttpd/
999 +URL: http://www.lighttpd.net/
1000 Requires: pcre >= 3.1 zlib
1001 -BuildPrereq: libtool zlib-devel
1002 +BuildRequires: libtool zlib-devel
1003 BuildRoot: %{_tmppath}/%{name}-root
1007 lighttpd is intented to be a frontend for ad-servers which have to deliver
1008 small files concurrently to many connections.
1010 -Available rpmbuild rebuild options :
1011 ---with : ssl mysql lua memcache
1012 +Available rpmbuild rebuild options:
1013 +--with: ssl mysql lua memcache
1027 mkdir -p %{buildroot}%{_sysconfdir}/{init.d,sysconfig}
1028 -if test -f /etc/redhat-release -o -f /etc/fedora-release; then
1029 - install -m 755 doc/rc.lighttpd.redhat %{buildroot}%{_sysconfdir}/init.d/lighttpd
1030 +if [ -f /etc/redhat-release -o -f /etc/fedora-release ]; then
1031 + install -m 755 doc/rc.lighttpd.redhat %{buildroot}%{_sysconfdir}/init.d/lighttpd
1033 - install -m 755 doc/rc.lighttpd %{buildroot}%{_sysconfdir}/init.d/lighttpd
1034 + install -m 755 doc/rc.lighttpd %{buildroot}%{_sysconfdir}/init.d/lighttpd
1036 install -m 644 doc/sysconfig.lighttpd %{buildroot}%{_sysconfdir}/sysconfig/lighttpd
1041 ## read http://www.fedora.us/docs/spec.html next time :)
1042 -if test "$1" = "1"; then
1043 - # real install, not upgrade
1044 - /sbin/chkconfig --add lighttpd
1045 +if [ "$1" = "1" ]; then
1046 + # real install, not upgrade
1047 + /sbin/chkconfig --add lighttpd
1051 -if test "$1" = "0"; then
1052 - # real uninstall, not upgrade
1053 - %{_sysconfdir}/init.d/lighttpd stop
1054 - /sbin/chkconfig --del lighttpd
1055 +if [ "$1" = "0"]; then
1056 + # real uninstall, not upgrade
1057 + %{_sysconfdir}/init.d/lighttpd stop
1058 + /sbin/chkconfig --del lighttpd