]> git.pld-linux.org Git - packages/lighttpd.git/blob - lighttpd-branch.diff
- update to 2039
[packages/lighttpd.git] / lighttpd-branch.diff
1 Index: configure.in
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)
7 @@ -341,6 +341,10 @@
8                 }
9                 break;
10         }
11 +       case COMP_HTTP_SCHEME:
12 +               l = con->uri.scheme;
13 +               break;
14 +
15         case COMP_HTTP_URL:
16                 l = con->uri.path;
17                 break;
18 Index: src/array.h
19 ===================================================================
20 --- src/array.h (.../tags/lighttpd-1.4.18)      (revision 2039)
21 +++ src/array.h (.../branches/lighttpd-1.4.x)   (revision 2039)
22 @@ -90,6 +90,7 @@
23         COMP_HTTP_COOKIE,
24         COMP_HTTP_REMOTEIP,
25         COMP_HTTP_QUERYSTRING,
26 +       COMP_HTTP_SCHEME,
27  
28         COMP_LAST_ELEMENT
29  } comp_key_t;
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)
34 @@ -483,8 +483,24 @@
35                         /* if the value is the same as our ETag, we do a Range-request,
36                          * otherwise a full 200 */
37  
38 -                       if (!buffer_is_equal(ds->value, con->physical.etag)) {
39 +                       if (ds->value->ptr[0] == '"') {
40 +                               /**
41 +                                * client wants a ETag
42 +                                */
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;
47 +                               }
48 +                       } else if (!mtime) {
49 +                               /**
50 +                                * we don't have a Last-Modified and can match the If-Range: 
51 +                                *
52 +                                * sending all
53 +                                */
54                                 do_range_request = 0;
55 +                       } else if (!buffer_is_equal(ds->value, mtime)) {
56 +                               do_range_request = 0;
57                         }
58                 }
59  
60 Index: src/mod_scgi.c
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)
64 @@ -2694,8 +2694,9 @@
65                 if (s_len < ct_len) continue;
66  
67                 /* check extension in the form "/scgi_pattern" */
68 -               if (*(extension->key->ptr) == '/' && strncmp(fn->ptr, extension->key->ptr, ct_len) == 0) {
69 -                       break;
70 +               if (*(extension->key->ptr) == '/') {
71 +                       if (strncmp(fn->ptr, extension->key->ptr, ct_len) == 0)
72 +                               break;
73                 } else if (0 == strncmp(fn->ptr + s_len - ct_len, extension->key->ptr, ct_len)) {
74                         /* check extension in the form ".fcg" */
75                         break;
76 Index: src/response.c
77 ===================================================================
78 --- src/response.c      (.../tags/lighttpd-1.4.18)      (revision 2039)
79 +++ src/response.c      (.../branches/lighttpd-1.4.x)   (revision 2039)
80 @@ -59,7 +59,8 @@
81                 ds = (data_string *)con->response.headers->data[i];
82  
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;
89  
90 @@ -180,6 +181,7 @@
91                 buffer_copy_string_buffer(con->uri.authority, con->request.http_host);
92                 buffer_to_lower(con->uri.authority);
93  
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;
104  
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) {
108 -                               char *pi_offset;
109 +               if (*(extension->key->ptr) == '/') {
110 +                       if (strncmp(fn->ptr, extension->key->ptr, ct_len) == 0) {
111 +                               if (s_len > ct_len + 1) {
112 +                                       char *pi_offset;
113  
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;
118 +                                       }
119                                 }
120 +                               break;
121                         }
122 -                       break;
123                 } else if (0 == strncmp(fn->ptr + s_len - ct_len, extension->key->ptr, ct_len)) {
124                         /* check extension in the form ".fcg" */
125                         break;
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)
130 @@ -422,6 +422,7 @@
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 },
136      };
137      size_t i;
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)
142 @@ -37,7 +37,7 @@
143  #endif
144  
145  #ifdef HAVE_SYS_UN_H
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) {
148         int fcgi_fd;
149         int socket_type, status;
150         struct timeval tv = { 0, 100 * 1000 };
151 @@ -137,11 +137,10 @@
152                 switch (child) {
153                 case 0: {
154                         char cgi_childs[64];
155 -                       char *b;
156  
157                         int i = 0;
158  
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);
162  
163                         if(fcgi_fd != FCGI_LISTENSOCK_FILENO) {
164 @@ -160,13 +159,18 @@
165                         putenv(cgi_childs);
166  
167                         /* fork and replace shell */
168 -                       b = malloc(strlen("exec ") + strlen(appPath) + 1);
169 -                       strcpy(b, "exec ");
170 -                       strcat(b, appPath);
171 +                       if (appArgv) {
172 +                               execv(appArgv[0], appArgv);
173  
174 -                       /* exec the cgi */
175 -                       execl("/bin/sh", "sh", "-c", b, (char *)NULL);
176 +                       } else {
177 +                               char *b = malloc(strlen("exec ") + strlen(appPath) + 1);
178 +                               strcpy(b, "exec ");
179 +                               strcat(b, appPath);
180  
181 +                               /* exec the cgi */
182 +                               execl("/bin/sh", "sh", "-c", b, (char *)NULL);
183 +                       }
184 +
185                         exit(errno);
186  
187                         break;
188 @@ -239,9 +243,12 @@
189  }
190  
191  void show_help () {
192 -       char *b = "spawn-fcgi" "-" PACKAGE_VERSION \
193 -" - spawns fastcgi processes\n" \
194 -"usage:\n" \
195 +       char *b = \
196 +"Usage: spawn-fcgi [options] -- <fcgiapp> [fcgi app arguments]\n" \
197 +"\n" \
198 +"spawn-fcgi v" PACKAGE_VERSION " - spawns fastcgi processes\n" \
199 +"\n" \
200 +"Options:\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" \
204 @@ -264,6 +271,7 @@
205         char *fcgi_app = NULL, *changeroot = NULL, *username = NULL,
206                 *groupname = NULL, *unixsocket = NULL, *pid_file = NULL,
207                  *addr = NULL;
208 +       char **fcgi_app_argv = { NULL };
209         unsigned short port = 0;
210         int child_count = 5;
211         int i_am_root, o;
212 @@ -274,7 +282,7 @@
213  
214         i_am_root = (getuid() == 0);
215  
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:"))) {
218                 switch(o) {
219                 case 'f': fcgi_app = optarg; break;
220                 case 'a': addr = optarg;/* ip addr */ break;
221 @@ -294,7 +302,11 @@
222                 }
223         }
224  
225 -       if (fcgi_app == NULL || (port == 0 && unixsocket == NULL)) {
226 +       if (optind < argc) {
227 +               fcgi_app_argv = &argv[optind];
228 +       }
229 +
230 +       if ((fcgi_app == NULL && fcgi_app_argv == NULL) || (port == 0 && unixsocket == NULL)) {
231                 show_help();
232                 return -1;
233         }
234 @@ -404,6 +416,18 @@
235                         }
236                 }
237  
238 +               /*
239 +                * Change group before chroot, when we have access
240 +                * to /etc/group
241 +                */
242 +               if (groupname) {
243 +                       setgid(grp->gr_gid);
244 +                       setgroups(0, NULL);
245 +                       if (username) {
246 +                               initgroups(username, grp->gr_gid);
247 +                       }
248 +               }
249 +
250                 if (changeroot) {
251                         if (-1 == chroot(changeroot)) {
252                                 fprintf(stderr, "%s.%d: %s %s\n",
253 @@ -420,18 +444,12 @@
254                 }
255  
256                 /* drop root privs */
257 -               if (groupname) {
258 -                       setgid(grp->gr_gid);
259 -               }
260                 if (username) {
261 -                       if (groupname) {
262 -                               initgroups(username, grp->gr_gid);
263 -                       }
264                         setuid(pwd->pw_uid);
265                 }
266         }
267  
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);
270  }
271  #else
272  int main() {
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;
279  
280                         if ((auth_type_len == 5) &&
281 -                           (0 == strncmp(http_authorization, "Basic", auth_type_len))) {
282 +                           (0 == strncasecmp(http_authorization, "Basic", auth_type_len))) {
283  
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);
286                                 }
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)
297 @@ -162,8 +162,8 @@
298          * if host is one of the local IP adresses the
299          * whole connection is local
300          *
301 -        * if tcp/ip should be used host AND port have
302 -        * to be specified
303 +        * if port is not 0, and host is not specified,
304 +        * "localhost" (INADDR_LOOPBACK) is assumed.
305          *
306          */
307         buffer *host;
308 @@ -823,12 +823,12 @@
309                 fcgi_addr_in.sin_family = AF_INET;
310  
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);
314                 } else {
315                         struct hostent *he;
316  
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);
320  
321  
322                         if (NULL == (he = gethostbyname(host->host->ptr))) {
323 @@ -858,7 +858,11 @@
324                 fcgi_addr = (struct sockaddr *) &fcgi_addr_in;
325  
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);
330 +               } else {
331 +                       buffer_append_string(proc->connection_name, "localhost");
332 +               }
333                 buffer_append_string(proc->connection_name, ":");
334                 buffer_append_long(proc->connection_name, proc->port);
335         }
336 @@ -1687,12 +1691,16 @@
337  #endif
338         } else {
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");
344 -
345 -                       return -1;
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");
351 +       
352 +                               return -1;
353 +                       }
354 +               } else {
355 +                       fcgi_addr_in.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
356                 }
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);
366 +                       } else {
367 +                               buffer_append_string(proc->connection_name, "localhost");
368 +                       }
369                         buffer_append_string(proc->connection_name, ":");
370                         buffer_append_long(proc->connection_name, proc->port);
371                 }
372 @@ -2530,15 +2542,28 @@
373                                 }
374  
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;
380  
381                                         if (HANDLER_ERROR != stat_cache_get_entry(srv, con, ds->value, &sce)) {
382 +                                               data_string *dcls = data_string_init();
383                                                 /* found */
384 -
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);
388 +
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);
393 +
394 +                                               con->parsed_response |= HTTP_CONTENT_LENGTH;
395 +                                               con->response.content_length = sce->st.st_size;
396 +                                       } else {
397 +                                               log_error_write(srv, __FILE__, __LINE__, "sb",
398 +                                                       "send-file error: couldn't get stat_cache entry for:",
399 +                                                       ds->value);
400                                         }
401                                 }
402  
403 @@ -2719,9 +2744,14 @@
404  
405         int ret;
406  
407 -       /* sanity check */
408 +       /* sanity check:
409 +        *  - host != NULL
410 +        *  - either:
411 +        *     - tcp socket (do not check host->host->uses, as it may be not set which means INADDR_LOOPBACK)
412 +        *     - unix socket
413 +        */
414         if (!host ||
415 -           ((!host->host->used || !host->port) && !host->unixsocket->used)) {
416 +           (!host->port && !host->unixsocket->used)) {
417                 log_error_write(srv, __FILE__, __LINE__, "sxddd",
418                                 "write-req: error",
419                                 host,
420 @@ -3456,8 +3486,9 @@
421                         if (s_len < ct_len) continue;
422  
423                         /* check extension in the form "/fcgi_pattern" */
424 -                       if (*(extension->key->ptr) == '/' && strncmp(fn->ptr, extension->key->ptr, ct_len) == 0) {
425 -                               break;
426 +                       if (*(extension->key->ptr) == '/') {
427 +                               if (strncmp(fn->ptr, extension->key->ptr, ct_len) == 0)
428 +                                       break;
429                         } else if (0 == strncmp(fn->ptr + s_len - ct_len, extension->key->ptr, ct_len)) {
430                                 /* check extension in the form ".fcg" */
431                                 break;
432 @@ -3473,7 +3504,7 @@
433         for (k = 0; k < extension->used; k++) {
434                 host = extension->hosts[k];
435  
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) {
439                         host = NULL;
440  
441 Index: src/server.c
442 ===================================================================
443 --- src/server.c        (.../tags/lighttpd-1.4.18)      (revision 2039)
444 +++ src/server.c        (.../branches/lighttpd-1.4.x)   (revision 2039)
445 @@ -759,6 +759,19 @@
446  
447                         return -1;
448                 }
449 +#ifdef HAVE_PWD_H
450 +               /* 
451 +                * Change group before chroot, when we have access
452 +                * to /etc/group
453 +                * */
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);
459 +                       }
460 +               }
461 +#endif
462  #ifdef HAVE_CHROOT
463                 if (srv->srvconf.changeroot->used) {
464                         tzset();
465 @@ -775,15 +788,7 @@
466  #endif
467  #ifdef HAVE_PWD_H
468                 /* drop root privs */
469 -               if (srv->srvconf.groupname->used) {
470 -                       setgid(grp->gr_gid);
471 -                       setgroups(0, NULL);
472 -               }
473 -
474                 if (srv->srvconf.username->used) {
475 -                       if (srv->srvconf.groupname->used) {
476 -                               initgroups(srv->srvconf.username->ptr, grp->gr_gid);
477 -                       }
478                         setuid(pwd->pw_uid);
479                 }
480  #endif
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)
485 @@ -1,9 +1,9 @@
486  #!/usr/bin/env perl
487  BEGIN {
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;
496  }
497  
498  use strict;
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)
503 @@ -1,14 +1,14 @@
504  #!/usr/bin/env perl
505  BEGIN {
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;
514  }
515  
516  use strict;
517  use IO::Socket;
518 -use Test::More tests => 13;
519 +use Test::More tests => 14;
520  use LightyTest;
521  
522  my $tf = LightyTest->new();
523 @@ -48,6 +48,16 @@
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)');
526  
527 +$t->{REQUEST}  = ( <<EOF
528 +GET /server-config HTTP/1.0
529 +Host: auth-htpasswd.example.org
530 +Authorization: basic ZGVzOmRlcw==
531 +EOF
532 + );
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)');
535 +
536 +
537  SKIP: {
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)
544 @@ -1,9 +1,9 @@
545  #!/usr/bin/env perl
546  BEGIN {
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;
555  }
556  
557  use strict;
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)
562 @@ -1,10 +1,9 @@
563  #!/usr/bin/env perl
564 -
565  BEGIN {
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;
574  }
575  
576  use strict;
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)
581 @@ -1,9 +1,9 @@
582  #!/usr/bin/env perl
583  BEGIN {
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;
592  }
593  
594  use strict;
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)
599 @@ -1,9 +1,9 @@
600  #!/usr/bin/env perl
601  BEGIN {
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;
610  }
611  
612  use strict;
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)
617 @@ -1,9 +1,9 @@
618  #!/usr/bin/env perl
619  BEGIN {
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;
628  }
629  
630  use strict;
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)
635 @@ -1,10 +1,9 @@
636  #!/usr/bin/env perl
637 -
638  BEGIN {
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;
647  }
648  
649  use strict;
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)
654 @@ -1,10 +1,9 @@
655  #!/usr/bin/perl
656 -
657  BEGIN {
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;
666  }
667  
668  use strict;
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)
673 @@ -1,9 +1,9 @@
674  #!/usr/bin/env perl
675  BEGIN {
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;
684  }
685  
686  use strict;
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)
691 @@ -1,9 +1,9 @@
692  #!/usr/bin/env perl
693  BEGIN {
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;
702  }
703  
704  use strict;
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)
709 @@ -1,9 +1,9 @@
710  #!/usr/bin/env perl
711  BEGIN {
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;
720  }
721  
722  use strict;
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)
727 @@ -1,9 +1,9 @@
728  #!/usr/bin/env perl
729  BEGIN {
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;
738  }
739  
740  use strict;
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)
745 @@ -1,9 +1,9 @@
746  #!/usr/bin/env perl
747  BEGIN {
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;
756  }
757  
758  use strict;
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)
763 @@ -1,10 +1,9 @@
764  #!/usr/bin/env perl
765 -
766  BEGIN {
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;
775  }
776  
777  use strict;
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)
782 @@ -1,9 +1,9 @@
783  #!/usr/bin/env perl
784  BEGIN {
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;
793  }
794  
795  use strict;
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)
800 @@ -1,9 +1,9 @@
801  #!/usr/bin/env perl
802  BEGIN {
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;
811  }
812  
813  use strict;
814 Index: tests/core.t
815 ===================================================================
816 --- tests/core.t        (.../tags/lighttpd-1.4.18)      (revision 2039)
817 +++ tests/core.t        (.../branches/lighttpd-1.4.x)   (revision 2039)
818 @@ -1,10 +1,9 @@
819  #!/usr/bin/env perl
820 -
821  BEGIN {
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;
830  }
831  
832  use strict;
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)
837 @@ -1,9 +1,9 @@
838  #!/usr/bin/env perl
839  BEGIN {
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;
848  }
849  
850  use strict;
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)
855 @@ -1,9 +1,9 @@
856  #!/usr/bin/env perl
857  BEGIN {
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;
866  }
867  
868  use strict;
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)
873 @@ -10,10 +10,10 @@
874  #   returning no status -> 200
875  #
876  BEGIN {
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;
885  }
886  
887  use strict;
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)
892 @@ -1,9 +1,9 @@
893  #!/usr/bin/env perl
894  BEGIN {
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;
903  }
904  
905  use strict;
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)
910 @@ -1,9 +1,9 @@
911  #!/usr/bin/env perl
912  BEGIN {
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;
921  }
922  
923  use strict;
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)
928 @@ -1,9 +1,9 @@
929  #!/usr/bin/env perl
930  BEGIN {
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;
939  }
940  
941  use strict;
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)
946 @@ -85,6 +85,8 @@
947  
948  $HTTP["cookie"]
949    match on cookie
950 +$HTTP["scheme"]
951 +  match on scheme
952  $HTTP["host"]
953    match on host
954  $HTTP["useragent"]
955 Index: SConstruct
956 ===================================================================
957 Index: Makefile.am
958 ===================================================================
959 --- Makefile.am (.../tags/lighttpd-1.4.18)      (revision 2039)
960 +++ Makefile.am (.../branches/lighttpd-1.4.x)   (revision 2039)
961 @@ -1,3 +1,3 @@
962  SUBDIRS=src doc tests cygwin openwrt
963  
964 -EXTRA_DIST=lighttpd.spec
965 +EXTRA_DIST=lighttpd.spec SConstruct
966 Index: NEWS
967 ===================================================================
968 --- NEWS        (.../tags/lighttpd-1.4.18)      (revision 2039)
969 +++ NEWS        (.../branches/lighttpd-1.4.x)   (revision 2039)
970 @@ -3,6 +3,19 @@
971  NEWS
972  ====
973  
974 +- 1.4.19 -
975 +
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)
986 +
987  - 1.4.18 - 2007-09-09
988  
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)
994 @@ -6,21 +6,19 @@
995  Packager: Jan Kneschke <jan@kneschke.de>
996  License: BSD
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
1004  
1005 -
1006  %description
1007  lighttpd is intented to be a frontend for ad-servers which have to deliver
1008  small files concurrently to many connections.
1009  
1010 -Available rpmbuild rebuild options :
1011 ---with : ssl mysql lua memcache
1012 +Available rpmbuild rebuild options:
1013 +--with: ssl mysql lua memcache
1014  
1015  %prep
1016 -
1017  %setup -q
1018  
1019  %build
1020 @@ -33,14 +31,13 @@
1021  make
1022  
1023  %install
1024 -
1025  %makeinstall
1026  
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
1032  else
1033 -  install -m 755 doc/rc.lighttpd %{buildroot}%{_sysconfdir}/init.d/lighttpd
1034 +       install -m 755 doc/rc.lighttpd %{buildroot}%{_sysconfdir}/init.d/lighttpd
1035  fi
1036  install -m 644 doc/sysconfig.lighttpd %{buildroot}%{_sysconfdir}/sysconfig/lighttpd
1037  
1038 @@ -49,16 +46,16 @@
1039  
1040  %post
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
1048  fi
1049  
1050  %preun
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
1059  fi
1060  
1061  %files
This page took 0.171479 seconds and 4 git commands to generate.