]> git.pld-linux.org Git - packages/lighttpd.git/blob - lighttpd-branch.diff
- exclude tests/symlink.t
[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 2043)
6 +++ src/configfile-glue.c       (.../branches/lighttpd-1.4.x)   (revision 2043)
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 2043)
21 +++ src/array.h (.../branches/lighttpd-1.4.x)   (revision 2043)
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 2043)
33 +++ src/mod_staticfile.c        (.../branches/lighttpd-1.4.x)   (revision 2043)
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 2043)
63 +++ src/mod_scgi.c      (.../branches/lighttpd-1.4.x)   (revision 2043)
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 2043)
79 +++ src/response.c      (.../branches/lighttpd-1.4.x)   (revision 2043)
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 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;
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/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)
130 @@ -281,4 +281,4 @@
131  #ajp_SOURCES = ajp.c
132  
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)
140 @@ -422,6 +422,7 @@
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 },
146      };
147      size_t i;
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)
152 @@ -37,7 +37,7 @@
153  #endif
154  
155  #ifdef HAVE_SYS_UN_H
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) {
158         int fcgi_fd;
159         int socket_type, status;
160         struct timeval tv = { 0, 100 * 1000 };
161 @@ -137,11 +137,10 @@
162                 switch (child) {
163                 case 0: {
164                         char cgi_childs[64];
165 -                       char *b;
166  
167                         int i = 0;
168  
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);
172  
173                         if(fcgi_fd != FCGI_LISTENSOCK_FILENO) {
174 @@ -160,13 +159,18 @@
175                         putenv(cgi_childs);
176  
177                         /* fork and replace shell */
178 -                       b = malloc(strlen("exec ") + strlen(appPath) + 1);
179 -                       strcpy(b, "exec ");
180 -                       strcat(b, appPath);
181 +                       if (appArgv) {
182 +                               execv(appArgv[0], appArgv);
183  
184 -                       /* exec the cgi */
185 -                       execl("/bin/sh", "sh", "-c", b, (char *)NULL);
186 +                       } else {
187 +                               char *b = malloc(strlen("exec ") + strlen(appPath) + 1);
188 +                               strcpy(b, "exec ");
189 +                               strcat(b, appPath);
190  
191 +                               /* exec the cgi */
192 +                               execl("/bin/sh", "sh", "-c", b, (char *)NULL);
193 +                       }
194 +
195                         exit(errno);
196  
197                         break;
198 @@ -239,9 +243,12 @@
199  }
200  
201  void show_help () {
202 -       char *b = "spawn-fcgi" "-" PACKAGE_VERSION \
203 -" - spawns fastcgi processes\n" \
204 -"usage:\n" \
205 +       char *b = \
206 +"Usage: spawn-fcgi [options] -- <fcgiapp> [fcgi app arguments]\n" \
207 +"\n" \
208 +"spawn-fcgi v" PACKAGE_VERSION " - spawns fastcgi processes\n" \
209 +"\n" \
210 +"Options:\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" \
214 @@ -264,6 +271,7 @@
215         char *fcgi_app = NULL, *changeroot = NULL, *username = NULL,
216                 *groupname = NULL, *unixsocket = NULL, *pid_file = NULL,
217                  *addr = NULL;
218 +       char **fcgi_app_argv = { NULL };
219         unsigned short port = 0;
220         int child_count = 5;
221         int i_am_root, o;
222 @@ -274,7 +282,7 @@
223  
224         i_am_root = (getuid() == 0);
225  
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:"))) {
228                 switch(o) {
229                 case 'f': fcgi_app = optarg; break;
230                 case 'a': addr = optarg;/* ip addr */ break;
231 @@ -294,7 +302,11 @@
232                 }
233         }
234  
235 -       if (fcgi_app == NULL || (port == 0 && unixsocket == NULL)) {
236 +       if (optind < argc) {
237 +               fcgi_app_argv = &argv[optind];
238 +       }
239 +
240 +       if ((fcgi_app == NULL && fcgi_app_argv == NULL) || (port == 0 && unixsocket == NULL)) {
241                 show_help();
242                 return -1;
243         }
244 @@ -404,6 +416,18 @@
245                         }
246                 }
247  
248 +               /*
249 +                * Change group before chroot, when we have access
250 +                * to /etc/group
251 +                */
252 +               if (groupname) {
253 +                       setgid(grp->gr_gid);
254 +                       setgroups(0, NULL);
255 +                       if (username) {
256 +                               initgroups(username, grp->gr_gid);
257 +                       }
258 +               }
259 +
260                 if (changeroot) {
261                         if (-1 == chroot(changeroot)) {
262                                 fprintf(stderr, "%s.%d: %s %s\n",
263 @@ -420,18 +444,12 @@
264                 }
265  
266                 /* drop root privs */
267 -               if (groupname) {
268 -                       setgid(grp->gr_gid);
269 -               }
270                 if (username) {
271 -                       if (groupname) {
272 -                               initgroups(username, grp->gr_gid);
273 -                       }
274                         setuid(pwd->pw_uid);
275                 }
276         }
277  
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);
280  }
281  #else
282  int main() {
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;
289  
290                         if ((auth_type_len == 5) &&
291 -                           (0 == strncmp(http_authorization, "Basic", auth_type_len))) {
292 +                           (0 == strncasecmp(http_authorization, "Basic", auth_type_len))) {
293  
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);
296                                 }
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)
307 @@ -162,8 +162,8 @@
308          * if host is one of the local IP adresses the
309          * whole connection is local
310          *
311 -        * if tcp/ip should be used host AND port have
312 -        * to be specified
313 +        * if port is not 0, and host is not specified,
314 +        * "localhost" (INADDR_LOOPBACK) is assumed.
315          *
316          */
317         buffer *host;
318 @@ -823,12 +823,12 @@
319                 fcgi_addr_in.sin_family = AF_INET;
320  
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);
324                 } else {
325                         struct hostent *he;
326  
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);
330  
331  
332                         if (NULL == (he = gethostbyname(host->host->ptr))) {
333 @@ -858,7 +858,11 @@
334                 fcgi_addr = (struct sockaddr *) &fcgi_addr_in;
335  
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);
340 +               } else {
341 +                       buffer_append_string(proc->connection_name, "localhost");
342 +               }
343                 buffer_append_string(proc->connection_name, ":");
344                 buffer_append_long(proc->connection_name, proc->port);
345         }
346 @@ -1687,12 +1691,16 @@
347  #endif
348         } else {
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");
354 -
355 -                       return -1;
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");
361 +       
362 +                               return -1;
363 +                       }
364 +               } else {
365 +                       fcgi_addr_in.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
366                 }
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);
376 +                       } else {
377 +                               buffer_append_string(proc->connection_name, "localhost");
378 +                       }
379                         buffer_append_string(proc->connection_name, ":");
380                         buffer_append_long(proc->connection_name, proc->port);
381                 }
382 @@ -2530,15 +2542,28 @@
383                                 }
384  
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;
390  
391                                         if (HANDLER_ERROR != stat_cache_get_entry(srv, con, ds->value, &sce)) {
392 +                                               data_string *dcls = data_string_init();
393                                                 /* found */
394 -
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);
398 +
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);
403 +
404 +                                               con->parsed_response |= HTTP_CONTENT_LENGTH;
405 +                                               con->response.content_length = sce->st.st_size;
406 +                                       } else {
407 +                                               log_error_write(srv, __FILE__, __LINE__, "sb",
408 +                                                       "send-file error: couldn't get stat_cache entry for:",
409 +                                                       ds->value);
410                                         }
411                                 }
412  
413 @@ -2719,9 +2744,14 @@
414  
415         int ret;
416  
417 -       /* sanity check */
418 +       /* sanity check:
419 +        *  - host != NULL
420 +        *  - either:
421 +        *     - tcp socket (do not check host->host->uses, as it may be not set which means INADDR_LOOPBACK)
422 +        *     - unix socket
423 +        */
424         if (!host ||
425 -           ((!host->host->used || !host->port) && !host->unixsocket->used)) {
426 +           (!host->port && !host->unixsocket->used)) {
427                 log_error_write(srv, __FILE__, __LINE__, "sxddd",
428                                 "write-req: error",
429                                 host,
430 @@ -3456,8 +3486,9 @@
431                         if (s_len < ct_len) continue;
432  
433                         /* check extension in the form "/fcgi_pattern" */
434 -                       if (*(extension->key->ptr) == '/' && strncmp(fn->ptr, extension->key->ptr, ct_len) == 0) {
435 -                               break;
436 +                       if (*(extension->key->ptr) == '/') {
437 +                               if (strncmp(fn->ptr, extension->key->ptr, ct_len) == 0)
438 +                                       break;
439                         } else if (0 == strncmp(fn->ptr + s_len - ct_len, extension->key->ptr, ct_len)) {
440                                 /* check extension in the form ".fcg" */
441                                 break;
442 @@ -3473,7 +3504,7 @@
443         for (k = 0; k < extension->used; k++) {
444                 host = extension->hosts[k];
445  
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) {
449                         host = NULL;
450  
451 Index: src/server.c
452 ===================================================================
453 --- src/server.c        (.../tags/lighttpd-1.4.18)      (revision 2043)
454 +++ src/server.c        (.../branches/lighttpd-1.4.x)   (revision 2043)
455 @@ -759,6 +759,19 @@
456  
457                         return -1;
458                 }
459 +#ifdef HAVE_PWD_H
460 +               /* 
461 +                * Change group before chroot, when we have access
462 +                * to /etc/group
463 +                * */
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);
469 +                       }
470 +               }
471 +#endif
472  #ifdef HAVE_CHROOT
473                 if (srv->srvconf.changeroot->used) {
474                         tzset();
475 @@ -775,15 +788,7 @@
476  #endif
477  #ifdef HAVE_PWD_H
478                 /* drop root privs */
479 -               if (srv->srvconf.groupname->used) {
480 -                       setgid(grp->gr_gid);
481 -                       setgroups(0, NULL);
482 -               }
483 -
484                 if (srv->srvconf.username->used) {
485 -                       if (srv->srvconf.groupname->used) {
486 -                               initgroups(srv->srvconf.username->ptr, grp->gr_gid);
487 -                       }
488                         setuid(pwd->pw_uid);
489                 }
490  #endif
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)
495 @@ -1,9 +1,9 @@
496  #!/usr/bin/env perl
497  BEGIN {
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;
506  }
507  
508  use strict;
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)
513 @@ -1,14 +1,14 @@
514  #!/usr/bin/env perl
515  BEGIN {
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;
524  }
525  
526  use strict;
527  use IO::Socket;
528 -use Test::More tests => 13;
529 +use Test::More tests => 14;
530  use LightyTest;
531  
532  my $tf = LightyTest->new();
533 @@ -48,6 +48,16 @@
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)');
536  
537 +$t->{REQUEST}  = ( <<EOF
538 +GET /server-config HTTP/1.0
539 +Host: auth-htpasswd.example.org
540 +Authorization: basic ZGVzOmRlcw==
541 +EOF
542 + );
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)');
545 +
546 +
547  SKIP: {
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)
556 @@ -1,10 +1,9 @@
557  #!/usr/bin/env perl
558 -
559  BEGIN {
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;
568  }
569  
570  use strict;
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)
577 @@ -1,9 +1,9 @@
578  #!/usr/bin/env perl
579  BEGIN {
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;
588  }
589  
590  use strict;
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)
595 @@ -1,9 +1,9 @@
596  #!/usr/bin/env perl
597  BEGIN {
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;
606  }
607  
608  use strict;
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)
613 @@ -1,10 +1,9 @@
614  #!/usr/bin/env perl
615 -
616  BEGIN {
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;
625  }
626  
627  use strict;
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)
636 @@ -1,9 +1,9 @@
637  #!/usr/bin/env perl
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/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)
654 @@ -1,9 +1,9 @@
655  #!/usr/bin/env perl
656  BEGIN {
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;
665  }
666  
667  use strict;
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)
672 @@ -1,9 +1,9 @@
673  #!/usr/bin/env perl
674  BEGIN {
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;
683  }
684  
685  use strict;
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)
690 @@ -1,9 +1,9 @@
691  #!/usr/bin/env perl
692  BEGIN {
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;
701  }
702  
703  use strict;
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)
708 @@ -1,10 +1,9 @@
709  #!/usr/bin/env perl
710 -
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/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)
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/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)
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/core.t
760 ===================================================================
761 --- tests/core.t        (.../tags/lighttpd-1.4.18)      (revision 2043)
762 +++ tests/core.t        (.../branches/lighttpd-1.4.x)   (revision 2043)
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/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)
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/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)
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/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)
818 @@ -31,14 +31,20 @@
819        core-response.t \
820        core-keepalive.t \
821        core.t \
822 +         mod-proxy.t \
823 +         proxy.conf \
824 +         mod-secdownload.t \
825        mod-access.t \
826        mod-auth.t \
827        mod-cgi.t \
828        mod-compress.t \
829        mod-fastcgi.t \
830        mod-redirect.t \
831 +      mod-rewrite.t \
832        mod-userdir.t \
833 -      mod-rewrite.t \
834 +         env-variables.t \
835 +         env-variables.conf \
836 +         symlink.t \
837        request.t \
838        mod-ssi.t \
839        LightyTest.pm \
840 @@ -49,12 +55,12 @@
841        core-404-handler.t \
842        404-handler.conf
843  
844 -
845  TESTS_ENVIRONMENT=$(srcdir)/wrapper.sh $(srcdir) $(top_builddir)
846  
847  EXTRA_DIST=wrapper.sh lighttpd.conf \
848         lighttpd.user \
849         lighttpd.htpasswd \
850 +       SConscript \
851         $(CONFS) \
852         $(TESTS)
853  
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)
858 @@ -10,10 +10,10 @@
859  #   returning no status -> 200
860  #
861  BEGIN {
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;
870  }
871  
872  use strict;
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)
877 @@ -1,9 +1,9 @@
878  #!/usr/bin/env perl
879  BEGIN {
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;
888  }
889  
890  use strict;
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)
895 @@ -1,9 +1,9 @@
896  #!/usr/bin/env perl
897  BEGIN {
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;
906  }
907  
908  use strict;
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)
913 @@ -1,9 +1,9 @@
914  #!/usr/bin/env perl
915  BEGIN {
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;
924  }
925  
926  use strict;
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)
931 @@ -85,6 +85,8 @@
932  
933  $HTTP["cookie"]
934    match on cookie
935 +$HTTP["scheme"]
936 +  match on scheme
937  $HTTP["host"]
938    match on host
939  $HTTP["useragent"]
940 Index: SConstruct
941 ===================================================================
942 Index: Makefile.am
943 ===================================================================
944 --- Makefile.am (.../tags/lighttpd-1.4.18)      (revision 2043)
945 +++ Makefile.am (.../branches/lighttpd-1.4.x)   (revision 2043)
946 @@ -1,3 +1,3 @@
947  SUBDIRS=src doc tests cygwin openwrt
948  
949 -EXTRA_DIST=lighttpd.spec
950 +EXTRA_DIST=lighttpd.spec autogen.sh SConstruct
951 Index: NEWS
952 ===================================================================
953 --- NEWS        (.../tags/lighttpd-1.4.18)      (revision 2043)
954 +++ NEWS        (.../branches/lighttpd-1.4.x)   (revision 2043)
955 @@ -3,6 +3,19 @@
956  NEWS
957  ====
958  
959 +- 1.4.19 -
960 +
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)
971 +
972  - 1.4.18 - 2007-09-09
973  
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)
979 @@ -6,21 +6,19 @@
980  Packager: Jan Kneschke <jan@kneschke.de>
981  License: BSD
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
989  
990 -
991  %description
992  lighttpd is intented to be a frontend for ad-servers which have to deliver
993  small files concurrently to many connections.
994  
995 -Available rpmbuild rebuild options :
996 ---with : ssl mysql lua memcache
997 +Available rpmbuild rebuild options:
998 +--with: ssl mysql lua memcache
999  
1000  %prep
1001 -
1002  %setup -q
1003  
1004  %build
1005 @@ -33,14 +31,13 @@
1006  make
1007  
1008  %install
1009 -
1010  %makeinstall
1011  
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
1017  else
1018 -  install -m 755 doc/rc.lighttpd %{buildroot}%{_sysconfdir}/init.d/lighttpd
1019 +       install -m 755 doc/rc.lighttpd %{buildroot}%{_sysconfdir}/init.d/lighttpd
1020  fi
1021  install -m 644 doc/sysconfig.lighttpd %{buildroot}%{_sysconfdir}/sysconfig/lighttpd
1022  
1023 @@ -49,16 +46,16 @@
1024  
1025  %post
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
1033  fi
1034  
1035  %preun
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
1044  fi
1045  
1046  %files
This page took 0.099906 seconds and 4 git commands to generate.