]>
Commit | Line | Data |
---|---|---|
1e1cc0d1 ER |
1 | Index: configure.in |
2 | =================================================================== | |
09cf44bb ER |
3 | Index: src/configfile-glue.c |
4 | =================================================================== | |
94d9baaf ER |
5 | --- src/configfile-glue.c (.../tags/lighttpd-1.4.18) (revision 2043) |
6 | +++ src/configfile-glue.c (.../branches/lighttpd-1.4.x) (revision 2043) | |
09cf44bb ER |
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 | =================================================================== | |
94d9baaf ER |
20 | --- src/array.h (.../tags/lighttpd-1.4.18) (revision 2043) |
21 | +++ src/array.h (.../branches/lighttpd-1.4.x) (revision 2043) | |
09cf44bb ER |
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; | |
a9c05e12 | 30 | Index: src/mod_staticfile.c |
cc1350fa | 31 | =================================================================== |
94d9baaf ER |
32 | --- src/mod_staticfile.c (.../tags/lighttpd-1.4.18) (revision 2043) |
33 | +++ src/mod_staticfile.c (.../branches/lighttpd-1.4.x) (revision 2043) | |
09cf44bb ER |
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; | |
cc1350fa | 57 | } |
cc1350fa | 58 | } |
cc1350fa | 59 | |
1e1cc0d1 ER |
60 | Index: src/mod_scgi.c |
61 | =================================================================== | |
94d9baaf ER |
62 | --- src/mod_scgi.c (.../tags/lighttpd-1.4.18) (revision 2043) |
63 | +++ src/mod_scgi.c (.../branches/lighttpd-1.4.x) (revision 2043) | |
1e1cc0d1 ER |
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; | |
09cf44bb ER |
76 | Index: src/response.c |
77 | =================================================================== | |
94d9baaf ER |
78 | --- src/response.c (.../tags/lighttpd-1.4.18) (revision 2043) |
79 | +++ src/response.c (.../branches/lighttpd-1.4.x) (revision 2043) | |
1e1cc0d1 ER |
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 @@ | |
09cf44bb ER |
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: */ | |
1e1cc0d1 ER |
98 | Index: src/mod_proxy.c |
99 | =================================================================== | |
94d9baaf ER |
100 | --- src/mod_proxy.c (.../tags/lighttpd-1.4.18) (revision 2043) |
101 | +++ src/mod_proxy.c (.../branches/lighttpd-1.4.x) (revision 2043) | |
1e1cc0d1 ER |
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; | |
94d9baaf ER |
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 | |
09cf44bb ER |
136 | Index: src/configparser.y |
137 | =================================================================== | |
94d9baaf ER |
138 | --- src/configparser.y (.../tags/lighttpd-1.4.18) (revision 2043) |
139 | +++ src/configparser.y (.../branches/lighttpd-1.4.x) (revision 2043) | |
09cf44bb ER |
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; | |
10dbb8f0 ER |
148 | Index: src/spawn-fcgi.c |
149 | =================================================================== | |
94d9baaf ER |
150 | --- src/spawn-fcgi.c (.../tags/lighttpd-1.4.18) (revision 2043) |
151 | +++ src/spawn-fcgi.c (.../branches/lighttpd-1.4.x) (revision 2043) | |
10dbb8f0 ER |
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() { | |
f530c317 ER |
283 | Index: src/mod_auth.c |
284 | =================================================================== | |
94d9baaf ER |
285 | --- src/mod_auth.c (.../tags/lighttpd-1.4.18) (revision 2043) |
286 | +++ src/mod_auth.c (.../branches/lighttpd-1.4.x) (revision 2043) | |
f530c317 ER |
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; | |
1e1cc0d1 ER |
303 | Index: src/mod_fastcgi.c |
304 | =================================================================== | |
94d9baaf ER |
305 | --- src/mod_fastcgi.c (.../tags/lighttpd-1.4.18) (revision 2043) |
306 | +++ src/mod_fastcgi.c (.../branches/lighttpd-1.4.x) (revision 2043) | |
1e1cc0d1 ER |
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 | ||
10dbb8f0 ER |
451 | Index: src/server.c |
452 | =================================================================== | |
94d9baaf ER |
453 | --- src/server.c (.../tags/lighttpd-1.4.18) (revision 2043) |
454 | +++ src/server.c (.../branches/lighttpd-1.4.x) (revision 2043) | |
10dbb8f0 ER |
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 | |
1e1cc0d1 ER |
491 | Index: tests/mod-access.t |
492 | =================================================================== | |
94d9baaf ER |
493 | --- tests/mod-access.t (.../tags/lighttpd-1.4.18) (revision 2043) |
494 | +++ tests/mod-access.t (.../branches/lighttpd-1.4.x) (revision 2043) | |
1e1cc0d1 ER |
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; | |
f530c317 ER |
509 | Index: tests/mod-auth.t |
510 | =================================================================== | |
94d9baaf ER |
511 | --- tests/mod-auth.t (.../tags/lighttpd-1.4.18) (revision 2043) |
512 | +++ tests/mod-auth.t (.../branches/lighttpd-1.4.x) (revision 2043) | |
1e1cc0d1 ER |
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 | } | |
f530c317 ER |
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 | |
1e1cc0d1 ER |
550 | Index: tests/mod-secdownload.t |
551 | =================================================================== | |
1e1cc0d1 ER |
552 | Index: tests/core-response.t |
553 | =================================================================== | |
94d9baaf ER |
554 | --- tests/core-response.t (.../tags/lighttpd-1.4.18) (revision 2043) |
555 | +++ tests/core-response.t (.../branches/lighttpd-1.4.x) (revision 2043) | |
1e1cc0d1 ER |
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 | =================================================================== | |
94d9baaf ER |
573 | --- tests/symlink.t (.../tags/lighttpd-1.4.18) (revision 2043) |
574 | +++ tests/symlink.t (.../branches/lighttpd-1.4.x) (revision 2043) | |
1e1cc0d1 ER |
575 | @@ -1,9 +1,9 @@ |
576 | #!/usr/bin/env perl | |
577 | BEGIN { | |
578 | - # add current source dir to the include-path | |
579 | - # we need this for make distcheck | |
580 | - (my $srcdir = $0) =~ s#/[^/]+$#/#; | |
581 | - unshift @INC, $srcdir; | |
582 | + # add current source dir to the include-path | |
583 | + # we need this for make distcheck | |
584 | + (my $srcdir = $0) =~ s,/[^/]+$,/,; | |
585 | + unshift @INC, $srcdir; | |
586 | } | |
587 | ||
588 | use strict; | |
589 | Index: tests/request.t | |
590 | =================================================================== | |
94d9baaf ER |
591 | --- tests/request.t (.../tags/lighttpd-1.4.18) (revision 2043) |
592 | +++ tests/request.t (.../branches/lighttpd-1.4.x) (revision 2043) | |
1e1cc0d1 ER |
593 | @@ -1,9 +1,9 @@ |
594 | #!/usr/bin/env perl | |
595 | BEGIN { | |
596 | - # add current source dir to the include-path | |
597 | - # we need this for make distcheck | |
598 | - (my $srcdir = $0) =~ s#/[^/]+$#/#; | |
599 | - unshift @INC, $srcdir; | |
600 | + # add current source dir to the include-path | |
601 | + # we need this for make distcheck | |
602 | + (my $srcdir = $0) =~ s,/[^/]+$,/,; | |
603 | + unshift @INC, $srcdir; | |
604 | } | |
605 | ||
606 | use strict; | |
607 | Index: tests/mod-userdir.t | |
608 | =================================================================== | |
94d9baaf ER |
609 | --- tests/mod-userdir.t (.../tags/lighttpd-1.4.18) (revision 2043) |
610 | +++ tests/mod-userdir.t (.../branches/lighttpd-1.4.x) (revision 2043) | |
1e1cc0d1 ER |
611 | @@ -1,9 +1,9 @@ |
612 | #!/usr/bin/env perl | |
613 | BEGIN { | |
614 | - # add current source dir to the include-path | |
615 | - # we need this for make distcheck | |
616 | - (my $srcdir = $0) =~ s#/[^/]+$#/#; | |
617 | - unshift @INC, $srcdir; | |
618 | + # add current source dir to the include-path | |
619 | + # we need this for make distcheck | |
620 | + (my $srcdir = $0) =~ s,/[^/]+$,/,; | |
621 | + unshift @INC, $srcdir; | |
622 | } | |
623 | ||
624 | use strict; | |
625 | Index: tests/core-keepalive.t | |
626 | =================================================================== | |
94d9baaf ER |
627 | --- tests/core-keepalive.t (.../tags/lighttpd-1.4.18) (revision 2043) |
628 | +++ tests/core-keepalive.t (.../branches/lighttpd-1.4.x) (revision 2043) | |
1e1cc0d1 ER |
629 | @@ -1,10 +1,9 @@ |
630 | #!/usr/bin/env perl | |
631 | - | |
632 | BEGIN { | |
633 | - # add current source dir to the include-path | |
634 | - # we need this for make distcheck | |
635 | - (my $srcdir = $0) =~ s#/[^/]+$#/#; | |
636 | - unshift @INC, $srcdir; | |
637 | + # add current source dir to the include-path | |
638 | + # we need this for make distcheck | |
639 | + (my $srcdir = $0) =~ s,/[^/]+$,/,; | |
640 | + unshift @INC, $srcdir; | |
641 | } | |
642 | ||
643 | use strict; | |
644 | Index: tests/env-variables.t | |
645 | =================================================================== | |
1e1cc0d1 ER |
646 | Index: tests/mod-proxy.t |
647 | =================================================================== | |
1e1cc0d1 ER |
648 | Index: tests/core-var-include.t |
649 | =================================================================== | |
94d9baaf ER |
650 | --- tests/core-var-include.t (.../tags/lighttpd-1.4.18) (revision 2043) |
651 | +++ tests/core-var-include.t (.../branches/lighttpd-1.4.x) (revision 2043) | |
1e1cc0d1 ER |
652 | @@ -1,9 +1,9 @@ |
653 | #!/usr/bin/env perl | |
654 | BEGIN { | |
655 | - # add current source dir to the include-path | |
656 | - # we need this for make distcheck | |
657 | - (my $srcdir = $0) =~ s#/[^/]+$#/#; | |
658 | - unshift @INC, $srcdir; | |
659 | + # add current source dir to the include-path | |
660 | + # we need this for make distcheck | |
661 | + (my $srcdir = $0) =~ s,/[^/]+$,/,; | |
662 | + unshift @INC, $srcdir; | |
663 | } | |
664 | ||
665 | use strict; | |
666 | Index: tests/core-request.t | |
667 | =================================================================== | |
94d9baaf ER |
668 | --- tests/core-request.t (.../tags/lighttpd-1.4.18) (revision 2043) |
669 | +++ tests/core-request.t (.../branches/lighttpd-1.4.x) (revision 2043) | |
1e1cc0d1 ER |
670 | @@ -1,9 +1,9 @@ |
671 | #!/usr/bin/env perl | |
672 | BEGIN { | |
673 | - # add current source dir to the include-path | |
674 | - # we need this for make distcheck | |
675 | - (my $srcdir = $0) =~ s#/[^/]+$#/#; | |
676 | - unshift @INC, $srcdir; | |
677 | + # add current source dir to the include-path | |
678 | + # we need this for make distcheck | |
679 | + (my $srcdir = $0) =~ s,/[^/]+$,/,; | |
680 | + unshift @INC, $srcdir; | |
681 | } | |
682 | ||
683 | use strict; | |
684 | Index: tests/mod-redirect.t | |
685 | =================================================================== | |
94d9baaf ER |
686 | --- tests/mod-redirect.t (.../tags/lighttpd-1.4.18) (revision 2043) |
687 | +++ tests/mod-redirect.t (.../branches/lighttpd-1.4.x) (revision 2043) | |
1e1cc0d1 ER |
688 | @@ -1,9 +1,9 @@ |
689 | #!/usr/bin/env perl | |
690 | BEGIN { | |
691 | - # add current source dir to the include-path | |
692 | - # we need this for make distcheck | |
693 | - (my $srcdir = $0) =~ s#/[^/]+$#/#; | |
694 | - unshift @INC, $srcdir; | |
695 | + # add current source dir to the include-path | |
696 | + # we need this for make distcheck | |
697 | + (my $srcdir = $0) =~ s,/[^/]+$,/,; | |
698 | + unshift @INC, $srcdir; | |
699 | } | |
700 | ||
701 | use strict; | |
702 | Index: tests/mod-cgi.t | |
703 | =================================================================== | |
94d9baaf ER |
704 | --- tests/mod-cgi.t (.../tags/lighttpd-1.4.18) (revision 2043) |
705 | +++ tests/mod-cgi.t (.../branches/lighttpd-1.4.x) (revision 2043) | |
1e1cc0d1 ER |
706 | @@ -1,9 +1,9 @@ |
707 | #!/usr/bin/env perl | |
708 | BEGIN { | |
709 | - # add current source dir to the include-path | |
710 | - # we need this for make distcheck | |
711 | - (my $srcdir = $0) =~ s#/[^/]+$#/#; | |
712 | - unshift @INC, $srcdir; | |
713 | + # add current source dir to the include-path | |
714 | + # we need this for make distcheck | |
715 | + (my $srcdir = $0) =~ s,/[^/]+$,/,; | |
716 | + unshift @INC, $srcdir; | |
717 | } | |
718 | ||
719 | use strict; | |
720 | Index: tests/mod-setenv.t | |
721 | =================================================================== | |
94d9baaf ER |
722 | --- tests/mod-setenv.t (.../tags/lighttpd-1.4.18) (revision 2043) |
723 | +++ tests/mod-setenv.t (.../branches/lighttpd-1.4.x) (revision 2043) | |
1e1cc0d1 ER |
724 | @@ -1,10 +1,9 @@ |
725 | #!/usr/bin/env perl | |
726 | - | |
727 | BEGIN { | |
728 | - # add current source dir to the include-path | |
729 | - # we need this for make distcheck | |
730 | - (my $srcdir = $0) =~ s#/[^/]+$#/#; | |
731 | - unshift @INC, $srcdir; | |
732 | + # add current source dir to the include-path | |
733 | + # we need this for make distcheck | |
734 | + (my $srcdir = $0) =~ s,/[^/]+$,/,; | |
735 | + unshift @INC, $srcdir; | |
736 | } | |
737 | ||
738 | use strict; | |
739 | Index: tests/cachable.t | |
740 | =================================================================== | |
94d9baaf ER |
741 | --- tests/cachable.t (.../tags/lighttpd-1.4.18) (revision 2043) |
742 | +++ tests/cachable.t (.../branches/lighttpd-1.4.x) (revision 2043) | |
1e1cc0d1 ER |
743 | @@ -1,9 +1,9 @@ |
744 | #!/usr/bin/env perl | |
745 | BEGIN { | |
746 | - # add current source dir to the include-path | |
747 | - # we need this for make distcheck | |
748 | - (my $srcdir = $0) =~ s#/[^/]+$#/#; | |
749 | - unshift @INC, $srcdir; | |
750 | + # add current source dir to the include-path | |
751 | + # we need this for make distcheck | |
752 | + (my $srcdir = $0) =~ s,/[^/]+$,/,; | |
753 | + unshift @INC, $srcdir; | |
754 | } | |
755 | ||
756 | use strict; | |
757 | Index: tests/lowercase.t | |
758 | =================================================================== | |
94d9baaf ER |
759 | --- tests/lowercase.t (.../tags/lighttpd-1.4.18) (revision 2043) |
760 | +++ tests/lowercase.t (.../branches/lighttpd-1.4.x) (revision 2043) | |
1e1cc0d1 ER |
761 | @@ -1,9 +1,9 @@ |
762 | #!/usr/bin/env perl | |
763 | BEGIN { | |
764 | - # add current source dir to the include-path | |
765 | - # we need this for make distcheck | |
766 | - (my $srcdir = $0) =~ s#/[^/]+$#/#; | |
767 | - unshift @INC, $srcdir; | |
768 | + # add current source dir to the include-path | |
769 | + # we need this for make distcheck | |
770 | + (my $srcdir = $0) =~ s,/[^/]+$,/,; | |
771 | + unshift @INC, $srcdir; | |
772 | } | |
773 | ||
774 | use strict; | |
775 | Index: tests/core.t | |
776 | =================================================================== | |
94d9baaf ER |
777 | --- tests/core.t (.../tags/lighttpd-1.4.18) (revision 2043) |
778 | +++ tests/core.t (.../branches/lighttpd-1.4.x) (revision 2043) | |
1e1cc0d1 ER |
779 | @@ -1,10 +1,9 @@ |
780 | #!/usr/bin/env perl | |
781 | - | |
782 | BEGIN { | |
783 | - # add current source dir to the include-path | |
784 | - # we need this for make distcheck | |
785 | - (my $srcdir = $0) =~ s#/[^/]+$#/#; | |
786 | - unshift @INC, $srcdir; | |
787 | + # add current source dir to the include-path | |
788 | + # we need this for make distcheck | |
789 | + (my $srcdir = $0) =~ s,/[^/]+$,/,; | |
790 | + unshift @INC, $srcdir; | |
791 | } | |
792 | ||
793 | use strict; | |
794 | Index: tests/mod-fastcgi.t | |
795 | =================================================================== | |
94d9baaf ER |
796 | --- tests/mod-fastcgi.t (.../tags/lighttpd-1.4.18) (revision 2043) |
797 | +++ tests/mod-fastcgi.t (.../branches/lighttpd-1.4.x) (revision 2043) | |
1e1cc0d1 ER |
798 | @@ -1,9 +1,9 @@ |
799 | #!/usr/bin/env perl | |
800 | BEGIN { | |
801 | - # add current source dir to the include-path | |
802 | - # we need this for make distcheck | |
803 | - (my $srcdir = $0) =~ s#/[^/]+$#/#; | |
804 | - unshift @INC, $srcdir; | |
805 | + # add current source dir to the include-path | |
806 | + # we need this for make distcheck | |
807 | + (my $srcdir = $0) =~ s,/[^/]+$,/,; | |
808 | + unshift @INC, $srcdir; | |
809 | } | |
810 | ||
811 | use strict; | |
812 | Index: tests/mod-rewrite.t | |
813 | =================================================================== | |
94d9baaf ER |
814 | --- tests/mod-rewrite.t (.../tags/lighttpd-1.4.18) (revision 2043) |
815 | +++ tests/mod-rewrite.t (.../branches/lighttpd-1.4.x) (revision 2043) | |
1e1cc0d1 ER |
816 | @@ -1,9 +1,9 @@ |
817 | #!/usr/bin/env perl | |
818 | BEGIN { | |
819 | - # add current source dir to the include-path | |
820 | - # we need this for make distcheck | |
821 | - (my $srcdir = $0) =~ s#/[^/]+$#/#; | |
822 | - unshift @INC, $srcdir; | |
823 | + # add current source dir to the include-path | |
824 | + # we need this for make distcheck | |
825 | + (my $srcdir = $0) =~ s,/[^/]+$,/,; | |
826 | + unshift @INC, $srcdir; | |
827 | } | |
828 | ||
829 | use strict; | |
94d9baaf ER |
830 | Index: tests/Makefile.am |
831 | =================================================================== | |
832 | --- tests/Makefile.am (.../tags/lighttpd-1.4.18) (revision 2043) | |
833 | +++ tests/Makefile.am (.../branches/lighttpd-1.4.x) (revision 2043) | |
834 | @@ -31,14 +31,20 @@ | |
835 | core-response.t \ | |
836 | core-keepalive.t \ | |
837 | core.t \ | |
838 | + mod-proxy.t \ | |
839 | + proxy.conf \ | |
840 | + mod-secdownload.t \ | |
841 | mod-access.t \ | |
842 | mod-auth.t \ | |
843 | mod-cgi.t \ | |
844 | mod-compress.t \ | |
845 | mod-fastcgi.t \ | |
846 | mod-redirect.t \ | |
847 | + mod-rewrite.t \ | |
848 | mod-userdir.t \ | |
849 | - mod-rewrite.t \ | |
850 | + env-variables.t \ | |
851 | + env-variables.conf \ | |
852 | + symlink.t \ | |
853 | request.t \ | |
854 | mod-ssi.t \ | |
855 | LightyTest.pm \ | |
856 | @@ -49,12 +55,12 @@ | |
857 | core-404-handler.t \ | |
858 | 404-handler.conf | |
859 | ||
860 | - | |
861 | TESTS_ENVIRONMENT=$(srcdir)/wrapper.sh $(srcdir) $(top_builddir) | |
862 | ||
863 | EXTRA_DIST=wrapper.sh lighttpd.conf \ | |
864 | lighttpd.user \ | |
865 | lighttpd.htpasswd \ | |
866 | + SConscript \ | |
867 | $(CONFS) \ | |
868 | $(TESTS) | |
869 | ||
1e1cc0d1 ER |
870 | Index: tests/core-404-handler.t |
871 | =================================================================== | |
94d9baaf ER |
872 | --- tests/core-404-handler.t (.../tags/lighttpd-1.4.18) (revision 2043) |
873 | +++ tests/core-404-handler.t (.../branches/lighttpd-1.4.x) (revision 2043) | |
1e1cc0d1 ER |
874 | @@ -10,10 +10,10 @@ |
875 | # returning no status -> 200 | |
876 | # | |
877 | BEGIN { | |
878 | - # add current source dir to the include-path | |
879 | - # we need this for make distcheck | |
880 | - (my $srcdir = $0) =~ s#/[^/]+$#/#; | |
881 | - unshift @INC, $srcdir; | |
882 | + # add current source dir to the include-path | |
883 | + # we need this for make distcheck | |
884 | + (my $srcdir = $0) =~ s,/[^/]+$,/,; | |
885 | + unshift @INC, $srcdir; | |
886 | } | |
887 | ||
888 | use strict; | |
889 | Index: tests/mod-compress.t | |
890 | =================================================================== | |
94d9baaf ER |
891 | --- tests/mod-compress.t (.../tags/lighttpd-1.4.18) (revision 2043) |
892 | +++ tests/mod-compress.t (.../branches/lighttpd-1.4.x) (revision 2043) | |
1e1cc0d1 ER |
893 | @@ -1,9 +1,9 @@ |
894 | #!/usr/bin/env perl | |
895 | BEGIN { | |
896 | - # add current source dir to the include-path | |
897 | - # we need this for make distcheck | |
898 | - (my $srcdir = $0) =~ s#/[^/]+$#/#; | |
899 | - unshift @INC, $srcdir; | |
900 | + # add current source dir to the include-path | |
901 | + # we need this for make distcheck | |
902 | + (my $srcdir = $0) =~ s,/[^/]+$,/,; | |
903 | + unshift @INC, $srcdir; | |
904 | } | |
905 | ||
906 | use strict; | |
907 | Index: tests/mod-ssi.t | |
908 | =================================================================== | |
94d9baaf ER |
909 | --- tests/mod-ssi.t (.../tags/lighttpd-1.4.18) (revision 2043) |
910 | +++ tests/mod-ssi.t (.../branches/lighttpd-1.4.x) (revision 2043) | |
1e1cc0d1 ER |
911 | @@ -1,9 +1,9 @@ |
912 | #!/usr/bin/env perl | |
913 | BEGIN { | |
914 | - # add current source dir to the include-path | |
915 | - # we need this for make distcheck | |
916 | - (my $srcdir = $0) =~ s#/[^/]+$#/#; | |
917 | - unshift @INC, $srcdir; | |
918 | + # add current source dir to the include-path | |
919 | + # we need this for make distcheck | |
920 | + (my $srcdir = $0) =~ s,/[^/]+$,/,; | |
921 | + unshift @INC, $srcdir; | |
922 | } | |
923 | ||
924 | use strict; | |
925 | Index: tests/core-condition.t | |
926 | =================================================================== | |
94d9baaf ER |
927 | --- tests/core-condition.t (.../tags/lighttpd-1.4.18) (revision 2043) |
928 | +++ tests/core-condition.t (.../branches/lighttpd-1.4.x) (revision 2043) | |
1e1cc0d1 ER |
929 | @@ -1,9 +1,9 @@ |
930 | #!/usr/bin/env perl | |
931 | BEGIN { | |
932 | - # add current source dir to the include-path | |
933 | - # we need this for make distcheck | |
934 | - (my $srcdir = $0) =~ s#/[^/]+$#/#; | |
935 | - unshift @INC, $srcdir; | |
936 | + # add current source dir to the include-path | |
937 | + # we need this for make distcheck | |
938 | + (my $srcdir = $0) =~ s,/[^/]+$,/,; | |
939 | + unshift @INC, $srcdir; | |
940 | } | |
941 | ||
942 | use strict; | |
09cf44bb ER |
943 | Index: doc/configuration.txt |
944 | =================================================================== | |
94d9baaf ER |
945 | --- doc/configuration.txt (.../tags/lighttpd-1.4.18) (revision 2043) |
946 | +++ doc/configuration.txt (.../branches/lighttpd-1.4.x) (revision 2043) | |
09cf44bb ER |
947 | @@ -85,6 +85,8 @@ |
948 | ||
949 | $HTTP["cookie"] | |
950 | match on cookie | |
951 | +$HTTP["scheme"] | |
952 | + match on scheme | |
953 | $HTTP["host"] | |
954 | match on host | |
955 | $HTTP["useragent"] | |
1e1cc0d1 ER |
956 | Index: SConstruct |
957 | =================================================================== | |
10dbb8f0 ER |
958 | Index: Makefile.am |
959 | =================================================================== | |
94d9baaf ER |
960 | --- Makefile.am (.../tags/lighttpd-1.4.18) (revision 2043) |
961 | +++ Makefile.am (.../branches/lighttpd-1.4.x) (revision 2043) | |
10dbb8f0 ER |
962 | @@ -1,3 +1,3 @@ |
963 | SUBDIRS=src doc tests cygwin openwrt | |
964 | ||
965 | -EXTRA_DIST=lighttpd.spec | |
94d9baaf | 966 | +EXTRA_DIST=lighttpd.spec autogen.sh SConstruct |
cc1350fa ER |
967 | Index: NEWS |
968 | =================================================================== | |
94d9baaf ER |
969 | --- NEWS (.../tags/lighttpd-1.4.18) (revision 2043) |
970 | +++ NEWS (.../branches/lighttpd-1.4.x) (revision 2043) | |
1e1cc0d1 | 971 | @@ -3,6 +3,19 @@ |
cc1350fa ER |
972 | NEWS |
973 | ==== | |
974 | ||
09cf44bb ER |
975 | +- 1.4.19 - |
976 | + | |
977 | + * added support for If-Range: <date> (#1346) | |
978 | + * added support for matching $HTTP["scheme"] in configs | |
10dbb8f0 | 979 | + * fixed initgroups() called after chroot (#1384) |
f530c317 | 980 | + * fixed case-sensitive check for Auth-Method (#1456) |
10dbb8f0 | 981 | + * execute fcgi app without /bin/sh if used as argument to spawn-fcgi (#1428) |
1e1cc0d1 ER |
982 | + * fixed a bug that made /-prefixed extensions being handled also when |
983 | + matching the end of the uri in fcgi,scgi and proxy modules (#1489) | |
984 | + * print error if X-LIGHTTPD-send-file cannot be done; reset header | |
985 | + Content-Length for send-file. Patches by Stefan Buhler | |
986 | + * prevent crash in certain php-fcgi configurations (#841) | |
cc1350fa | 987 | + |
09cf44bb | 988 | - 1.4.18 - 2007-09-09 |
cc1350fa | 989 | |
09cf44bb | 990 | * fixed compile error on IRIX 6.5.x on prctl() (#1333) |
10dbb8f0 ER |
991 | Index: lighttpd.spec.in |
992 | =================================================================== | |
94d9baaf ER |
993 | --- lighttpd.spec.in (.../tags/lighttpd-1.4.18) (revision 2043) |
994 | +++ lighttpd.spec.in (.../branches/lighttpd-1.4.x) (revision 2043) | |
10dbb8f0 ER |
995 | @@ -6,21 +6,19 @@ |
996 | Packager: Jan Kneschke <jan@kneschke.de> | |
997 | License: BSD | |
998 | Group: Networking/Daemons | |
999 | -URL: http://jan.kneschke.de/projects/lighttpd/ | |
1000 | +URL: http://www.lighttpd.net/ | |
1001 | Requires: pcre >= 3.1 zlib | |
1002 | -BuildPrereq: libtool zlib-devel | |
1003 | +BuildRequires: libtool zlib-devel | |
1004 | BuildRoot: %{_tmppath}/%{name}-root | |
1005 | ||
1006 | - | |
1007 | %description | |
1008 | lighttpd is intented to be a frontend for ad-servers which have to deliver | |
1009 | small files concurrently to many connections. | |
1010 | ||
1011 | -Available rpmbuild rebuild options : | |
1012 | ---with : ssl mysql lua memcache | |
1013 | +Available rpmbuild rebuild options: | |
1014 | +--with: ssl mysql lua memcache | |
1015 | ||
1016 | %prep | |
1017 | - | |
1018 | %setup -q | |
1019 | ||
1020 | %build | |
1021 | @@ -33,14 +31,13 @@ | |
1022 | make | |
1023 | ||
1024 | %install | |
1025 | - | |
1026 | %makeinstall | |
1027 | ||
1028 | mkdir -p %{buildroot}%{_sysconfdir}/{init.d,sysconfig} | |
1029 | -if test -f /etc/redhat-release -o -f /etc/fedora-release; then | |
1030 | - install -m 755 doc/rc.lighttpd.redhat %{buildroot}%{_sysconfdir}/init.d/lighttpd | |
1031 | +if [ -f /etc/redhat-release -o -f /etc/fedora-release ]; then | |
1032 | + install -m 755 doc/rc.lighttpd.redhat %{buildroot}%{_sysconfdir}/init.d/lighttpd | |
1033 | else | |
1034 | - install -m 755 doc/rc.lighttpd %{buildroot}%{_sysconfdir}/init.d/lighttpd | |
1035 | + install -m 755 doc/rc.lighttpd %{buildroot}%{_sysconfdir}/init.d/lighttpd | |
1036 | fi | |
1037 | install -m 644 doc/sysconfig.lighttpd %{buildroot}%{_sysconfdir}/sysconfig/lighttpd | |
1038 | ||
1039 | @@ -49,16 +46,16 @@ | |
1040 | ||
1041 | %post | |
1042 | ## read http://www.fedora.us/docs/spec.html next time :) | |
1043 | -if test "$1" = "1"; then | |
1044 | - # real install, not upgrade | |
1045 | - /sbin/chkconfig --add lighttpd | |
1046 | +if [ "$1" = "1" ]; then | |
1047 | + # real install, not upgrade | |
1048 | + /sbin/chkconfig --add lighttpd | |
1049 | fi | |
1050 | ||
1051 | %preun | |
1052 | -if test "$1" = "0"; then | |
1053 | - # real uninstall, not upgrade | |
1054 | - %{_sysconfdir}/init.d/lighttpd stop | |
1055 | - /sbin/chkconfig --del lighttpd | |
1056 | +if [ "$1" = "0"]; then | |
1057 | + # real uninstall, not upgrade | |
1058 | + %{_sysconfdir}/init.d/lighttpd stop | |
1059 | + /sbin/chkconfig --del lighttpd | |
1060 | fi | |
1061 | ||
1062 | %files |