]> git.pld-linux.org Git - packages/lighttpd.git/blame - lighttpd-branch.diff
- do not copy Proxy-Connection: header to backend proxy server, fixes stalled connect...
[packages/lighttpd.git] / lighttpd-branch.diff
CommitLineData
709c1a0b 1Index: configure.in
54b68997 2===================================================================
709c1a0b 3Index: src/configfile-glue.c
54b68997 4===================================================================
2ed0f534
ER
5--- src/configfile-glue.c (.../tags/lighttpd-1.4.20) (revision 2336)
6+++ src/configfile-glue.c (.../branches/lighttpd-1.4.x) (revision 2336)
709c1a0b
ER
7@@ -1,4 +1,5 @@
8 #include <string.h>
9+#include <stdlib.h>
10
11 #include "base.h"
12 #include "buffer.h"
13@@ -90,6 +91,22 @@
14 case TYPE_STRING: {
15 data_string *ds = (data_string *)du;
16
17+ /* If the value came from an environment variable, then it is a
18+ * data_string, although it may contain a number in ASCII
19+ * decimal format. We try to interpret the string as a decimal
20+ * short before giving up, in order to support setting numeric
21+ * values with environment variables (eg, port number).
22+ */
23+ if (ds->value->ptr && *ds->value->ptr) {
24+ char *e;
25+ long l = strtol(ds->value->ptr, &e, 10);
26+ if (e != ds->value->ptr && !*e && l >=0 && l <= 65535) {
27+ *((unsigned short *)(cv[i].destination)) = l;
28+ break;
29+
30+ }
31+ }
32+
33 log_error_write(srv, __FILE__, __LINE__, "ssb", "got a string but expected a short:", cv[i].key, ds->value);
54b68997 34
709c1a0b
ER
35 return -1;
36Index: src/mod_cgi.c
54b68997 37===================================================================
2ed0f534
ER
38--- src/mod_cgi.c (.../tags/lighttpd-1.4.20) (revision 2336)
39+++ src/mod_cgi.c (.../branches/lighttpd-1.4.x) (revision 2336)
709c1a0b
ER
40@@ -822,15 +822,27 @@
41 );
42 cgi_env_add(&env, CONST_STR_LEN("SERVER_PORT"), buf, strlen(buf));
43
44+ switch (srv_sock->addr.plain.sa_family) {
45 #ifdef HAVE_IPV6
46- s = inet_ntop(srv_sock->addr.plain.sa_family,
47- srv_sock->addr.plain.sa_family == AF_INET6 ?
48- (const void *) &(srv_sock->addr.ipv6.sin6_addr) :
49- (const void *) &(srv_sock->addr.ipv4.sin_addr),
50- b2, sizeof(b2)-1);
51+ case AF_INET6:
52+ s = inet_ntop(srv_sock->addr.plain.sa_family,
53+ (const void *) &(srv_sock->addr.ipv6.sin6_addr),
54+ b2, sizeof(b2)-1);
55+ break;
56+ case AF_INET:
57+ s = inet_ntop(srv_sock->addr.plain.sa_family,
58+ (const void *) &(srv_sock->addr.ipv4.sin_addr),
59+ b2, sizeof(b2)-1);
60+ break;
61 #else
62- s = inet_ntoa(srv_sock->addr.ipv4.sin_addr);
63+ case AF_INET:
64+ s = inet_ntoa(srv_sock->addr.ipv4.sin_addr);
65+ break;
66 #endif
67+ default:
68+ s = "";
69+ break;
70+ }
71 cgi_env_add(&env, CONST_STR_LEN("SERVER_ADDR"), s, strlen(s));
54b68997 72
709c1a0b
ER
73 s = get_http_method_name(con->request.http_method);
74@@ -848,15 +860,27 @@
75 }
54b68997
ER
76
77
709c1a0b
ER
78+ switch (con->dst_addr.plain.sa_family) {
79 #ifdef HAVE_IPV6
80- s = inet_ntop(con->dst_addr.plain.sa_family,
81- con->dst_addr.plain.sa_family == AF_INET6 ?
82- (const void *) &(con->dst_addr.ipv6.sin6_addr) :
83- (const void *) &(con->dst_addr.ipv4.sin_addr),
84- b2, sizeof(b2)-1);
85+ case AF_INET6:
86+ s = inet_ntop(con->dst_addr.plain.sa_family,
87+ (const void *) &(con->dst_addr.ipv6.sin6_addr),
88+ b2, sizeof(b2)-1);
89+ break;
90+ case AF_INET:
91+ s = inet_ntop(con->dst_addr.plain.sa_family,
92+ (const void *) &(con->dst_addr.ipv4.sin_addr),
93+ b2, sizeof(b2)-1);
94+ break;
95 #else
96- s = inet_ntoa(con->dst_addr.ipv4.sin_addr);
97+ case AF_INET:
98+ s = inet_ntoa(con->dst_addr.ipv4.sin_addr);
99+ break;
100 #endif
101+ default:
102+ s = "";
103+ break;
54b68997 104+ }
709c1a0b 105 cgi_env_add(&env, CONST_STR_LEN("REMOTE_ADDR"), s, strlen(s));
54b68997 106
709c1a0b
ER
107 LI_ltostr(buf,
108Index: src/connections.c
109===================================================================
2ed0f534
ER
110--- src/connections.c (.../tags/lighttpd-1.4.20) (revision 2336)
111+++ src/connections.c (.../branches/lighttpd-1.4.x) (revision 2336)
709c1a0b
ER
112@@ -330,15 +330,13 @@
113 buffer_prepare_copy(b, 4 * 1024);
114 len = recv(con->fd, b->ptr, b->size - 1, 0);
115 #else
116- if (ioctl(con->fd, FIONREAD, &toread)) {
117- log_error_write(srv, __FILE__, __LINE__, "sd",
118- "unexpected end-of-file:",
119- con->fd);
120- return -1;
121+ if (ioctl(con->fd, FIONREAD, &toread) || toread == 0) {
122+ b = chunkqueue_get_append_buffer(con->read_queue);
123+ buffer_prepare_copy(b, 4 * 1024);
54b68997 124+ } else {
709c1a0b
ER
125+ b = chunkqueue_get_append_buffer(con->read_queue);
126+ buffer_prepare_copy(b, toread + 1);
54b68997 127 }
709c1a0b
ER
128- b = chunkqueue_get_append_buffer(con->read_queue);
129- buffer_prepare_copy(b, toread + 1);
130-
131 len = read(con->fd, b->ptr, b->size - 1);
132 #endif
54b68997 133
709c1a0b
ER
134Index: src/configfile.c
135===================================================================
2ed0f534
ER
136--- src/configfile.c (.../tags/lighttpd-1.4.20) (revision 2336)
137+++ src/configfile.c (.../branches/lighttpd-1.4.x) (revision 2336)
709c1a0b 138@@ -940,7 +940,6 @@
54b68997
ER
139 }
140
709c1a0b
ER
141 int config_parse_cmd(server *srv, config_t *context, const char *cmd) {
142- proc_handler_t proc;
143 tokenizer_t t;
144 int ret;
145 buffer *source;
146@@ -960,7 +959,7 @@
147 chdir(context->basedir->ptr);
148 }
54b68997 149
709c1a0b
ER
150- if (0 != proc_open_buffer(&proc, cmd, NULL, out, NULL)) {
151+ if (0 != proc_open_buffer(cmd, NULL, out, NULL)) {
152 log_error_write(srv, __FILE__, __LINE__, "sbss",
153 "opening", source, "failed:", strerror(errno));
154 ret = -1;
2ed0f534
ER
155Index: src/response.c
156===================================================================
157--- src/response.c (.../tags/lighttpd-1.4.20) (revision 2336)
158+++ src/response.c (.../branches/lighttpd-1.4.x) (revision 2336)
159@@ -44,16 +44,15 @@
160 buffer_append_string(b, get_http_status_name(con->http_status));
161
162 if (con->request.http_version != HTTP_VERSION_1_1 || con->keep_alive == 0) {
163- buffer_append_string_len(b, CONST_STR_LEN("\r\nConnection: "));
164 if (con->keep_alive) {
165- buffer_append_string_len(b, CONST_STR_LEN("keep-alive"));
166+ response_header_overwrite(srv, con, CONST_STR_LEN("Connection"), CONST_STR_LEN("keep-alive"));
167 } else {
168- buffer_append_string_len(b, CONST_STR_LEN("close"));
169+ response_header_overwrite(srv, con, CONST_STR_LEN("Connection"), CONST_STR_LEN("close"));
170 }
171 }
172
173 if (con->response.transfer_encoding & HTTP_TRANSFER_ENCODING_CHUNKED) {
174- buffer_append_string_len(b, CONST_STR_LEN("\r\nTransfer-Encoding: chunked"));
175+ response_header_overwrite(srv, con, CONST_STR_LEN("Transfer-Encoding"), CONST_STR_LEN("chunked"));
176 }
177
178
709c1a0b
ER
179Index: src/mod_simple_vhost.c
180===================================================================
2ed0f534
ER
181--- src/mod_simple_vhost.c (.../tags/lighttpd-1.4.20) (revision 2336)
182+++ src/mod_simple_vhost.c (.../branches/lighttpd-1.4.x) (revision 2336)
709c1a0b
ER
183@@ -249,6 +249,8 @@
184 return HANDLER_GO_ON;
185 } else {
186 buffer_copy_string_buffer(con->server_name, p->conf.default_host);
187+ /* do not cache default host */
188+ return HANDLER_GO_ON;
189 }
190 } else {
191 buffer_copy_string_buffer(con->server_name, con->uri.authority);
2ed0f534
ER
192Index: src/mod_proxy.c
193===================================================================
194--- src/mod_proxy.c (.../tags/lighttpd-1.4.20) (revision 2336)
195+++ src/mod_proxy.c (.../branches/lighttpd-1.4.x) (revision 2336)
196@@ -1198,7 +1198,8 @@
197 host = (data_proxy *)extension->value->data[0];
198
199 /* Use last_used_ndx from first host in list */
200- k = ndx = host->last_used_ndx;
201+ k = host->last_used_ndx;
202+ ndx = k + 1; /* use next host after the last one */
203 if (ndx < 0) ndx = 0;
204
205 /* Search first active host after last_used_ndx */
709c1a0b
ER
206Index: src/http_auth.c
207===================================================================
2ed0f534
ER
208--- src/http_auth.c (.../tags/lighttpd-1.4.20) (revision 2336)
209+++ src/http_auth.c (.../branches/lighttpd-1.4.x) (revision 2336)
709c1a0b
ER
210@@ -57,22 +57,25 @@
211
212 static const char base64_pad = '=';
213
214+/* "A-Z a-z 0-9 + /" maps to 0-63 */
215 static const short base64_reverse_table[256] = {
216- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
217- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
218- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63,
219- 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1,
220- -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
221- 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1,
222- -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
223- 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1,
224- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
225- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
226- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
227- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
228- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
229- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
230- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
231+/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
232+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x00 - 0x0F */
233+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x10 - 0x1F */
234+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63, /* 0x20 - 0x2F */
235+ 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1, /* 0x30 - 0x3F */
236+ -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, /* 0x40 - 0x4F */
237+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, /* 0x50 - 0x5F */
238+ -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, /* 0x60 - 0x6F */
239+ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1, /* 0x70 - 0x7F */
240+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x80 - 0x8F */
241+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0x90 - 0x9F */
242+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xA0 - 0xAF */
243+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xB0 - 0xBF */
244+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xC0 - 0xCF */
245+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xD0 - 0xDF */
246+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xE0 - 0xEF */
247+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /* 0xF0 - 0xFF */
248 };
54b68997 249
54b68997 250
709c1a0b
ER
251@@ -697,7 +700,7 @@
252 }
253 } else if (p->conf.auth_backend == AUTH_BACKEND_LDAP) {
254 #ifdef USE_LDAP
255- LDAP *ldap = NULL;
256+ LDAP *ldap;
257 LDAPMessage *lm, *first;
258 char *dn;
259 int ret;
260@@ -742,56 +745,45 @@
261 buffer_append_string_buffer(p->ldap_filter, username);
262 buffer_append_string_buffer(p->ldap_filter, p->conf.ldap_filter_post);
54b68997 263
54b68997 264+
709c1a0b
ER
265 /* 2. */
266- if (p->conf.ldap == NULL ||
267- LDAP_SUCCESS != (ret = ldap_search_s(p->conf.ldap, p->conf.auth_ldap_basedn->ptr, LDAP_SCOPE_SUBTREE, p->ldap_filter->ptr, attrs, 0, &lm))) {
268- /* try again if ldap was only temporary down */
269- if (p->conf.ldap == NULL || ret != LDAP_SERVER_DOWN || LDAP_SUCCESS != (ret = ldap_search_s(p->conf.ldap, p->conf.auth_ldap_basedn->ptr, LDAP_SCOPE_SUBTREE, p->ldap_filter->ptr, attrs, 0, &lm))) {
270- if (auth_ldap_init(srv, &p->conf) != HANDLER_GO_ON)
271+ if (p->anon_conf->ldap == NULL ||
272+ LDAP_SUCCESS != (ret = ldap_search_s(p->anon_conf->ldap, p->conf.auth_ldap_basedn->ptr, LDAP_SCOPE_SUBTREE, p->ldap_filter->ptr, attrs, 0, &lm))) {
273+
274+ /* try again; the ldap library sometimes fails for the first call but reconnects */
275+ if (p->anon_conf->ldap == NULL || ret != LDAP_SERVER_DOWN ||
276+ LDAP_SUCCESS != (ret = ldap_search_s(p->anon_conf->ldap, p->conf.auth_ldap_basedn->ptr, LDAP_SCOPE_SUBTREE, p->ldap_filter->ptr, attrs, 0, &lm))) {
277+
278+ if (auth_ldap_init(srv, p->anon_conf) != HANDLER_GO_ON)
279 return -1;
280
281- ldap = p->conf.ldap; /* save temporary ldap connection (TODO: redo ldap) */
282- if (LDAP_SUCCESS != (ret = ldap_search_s(p->conf.ldap, p->conf.auth_ldap_basedn->ptr, LDAP_SCOPE_SUBTREE, p->ldap_filter->ptr, attrs, 0, &lm))) {
283+ if (p->anon_conf->ldap == NULL ||
284+ LDAP_SUCCESS != (ret = ldap_search_s(p->anon_conf->ldap, p->conf.auth_ldap_basedn->ptr, LDAP_SCOPE_SUBTREE, p->ldap_filter->ptr, attrs, 0, &lm))) {
285 log_error_write(srv, __FILE__, __LINE__, "sssb",
286 "ldap:", ldap_err2string(ret), "filter:", p->ldap_filter);
287- /* destroy temporary ldap connection (TODO: redo ldap) */
288- ldap_unbind_s(ldap);
289 return -1;
290 }
291 }
292 }
54b68997 293
709c1a0b
ER
294- if (NULL == (first = ldap_first_entry(p->conf.ldap, lm))) {
295- /* No matching entry is not an error */
296- /* log_error_write(srv, __FILE__, __LINE__, "s", "ldap ..."); */
297+ if (NULL == (first = ldap_first_entry(p->anon_conf->ldap, lm))) {
298+ log_error_write(srv, __FILE__, __LINE__, "s", "ldap ...");
54b68997 299
709c1a0b 300 ldap_msgfree(lm);
54b68997 301
709c1a0b
ER
302- /* destroy temporary ldap connection (TODO: redo ldap) */
303- if (NULL != ldap) {
304- ldap_unbind_s(ldap);
305- }
306 return -1;
307 }
54b68997 308
709c1a0b
ER
309- if (NULL == (dn = ldap_get_dn(p->conf.ldap, first))) {
310- log_error_write(srv, __FILE__, __LINE__, "s", "ldap: ldap_get_dn failed");
311+ if (NULL == (dn = ldap_get_dn(p->anon_conf->ldap, first))) {
312+ log_error_write(srv, __FILE__, __LINE__, "s", "ldap ...");
54b68997 313
709c1a0b 314 ldap_msgfree(lm);
54b68997 315
709c1a0b
ER
316- /* destroy temporary ldap connection (TODO: redo ldap) */
317- if (NULL != ldap) {
318- ldap_unbind_s(ldap);
319- }
320 return -1;
321 }
54b68997 322
709c1a0b 323 ldap_msgfree(lm);
54b68997 324
709c1a0b
ER
325- /* destroy temporary ldap connection (TODO: redo ldap) */
326- if (NULL != ldap) {
327- ldap_unbind_s(ldap);
328- }
54b68997 329
709c1a0b
ER
330 /* 3. */
331 if (NULL == (ldap = ldap_init(p->conf.auth_ldap_hostname->ptr, LDAP_PORT))) {
332Index: src/http_auth.h
333===================================================================
2ed0f534
ER
334--- src/http_auth.h (.../tags/lighttpd-1.4.20) (revision 2336)
335+++ src/http_auth.h (.../branches/lighttpd-1.4.x) (revision 2336)
709c1a0b 336@@ -63,7 +63,7 @@
54b68997 337
709c1a0b 338 mod_auth_plugin_config **config_storage;
54b68997 339
709c1a0b
ER
340- mod_auth_plugin_config conf; /* this is only used as long as no handler_ctx is setup */
341+ mod_auth_plugin_config conf, *anon_conf; /* this is only used as long as no handler_ctx is setup */
342 } mod_auth_plugin_data;
54b68997 343
709c1a0b 344 int http_auth_basic_check(server *srv, connection *con, mod_auth_plugin_data *p, array *req, buffer *url, const char *realm_str);
2ed0f534
ER
345Index: src/mod_compress.c
346===================================================================
347--- src/mod_compress.c (.../tags/lighttpd-1.4.20) (revision 2336)
348+++ src/mod_compress.c (.../branches/lighttpd-1.4.x) (revision 2336)
349@@ -49,6 +49,7 @@
350 buffer *compress_cache_dir;
351 array *compress;
352 off_t compress_max_filesize; /** max filesize in kb */
353+ int allowed_encodings;
354 } plugin_config;
355
356 typedef struct {
357@@ -154,6 +155,7 @@
358 { "compress.cache-dir", NULL, T_CONFIG_STRING, T_CONFIG_SCOPE_CONNECTION },
359 { "compress.filetype", NULL, T_CONFIG_ARRAY, T_CONFIG_SCOPE_CONNECTION },
360 { "compress.max-filesize", NULL, T_CONFIG_SHORT, T_CONFIG_SCOPE_CONNECTION },
361+ { "compress.allowed-encodings", NULL, T_CONFIG_ARRAY, T_CONFIG_SCOPE_CONNECTION },
362 { NULL, NULL, T_CONFIG_UNSET, T_CONFIG_SCOPE_UNSET }
363 };
364
365@@ -161,15 +163,18 @@
366
367 for (i = 0; i < srv->config_context->used; i++) {
368 plugin_config *s;
369+ array *encodings_arr = array_init();
370
371 s = calloc(1, sizeof(plugin_config));
372 s->compress_cache_dir = buffer_init();
373 s->compress = array_init();
374 s->compress_max_filesize = 0;
375+ s->allowed_encodings = 0;
376
377 cv[0].destination = s->compress_cache_dir;
378 cv[1].destination = s->compress;
379 cv[2].destination = &(s->compress_max_filesize);
380+ cv[3].destination = encodings_arr; /* temp array for allowed encodings list */
381
382 p->config_storage[i] = s;
383
384@@ -177,6 +182,39 @@
385 return HANDLER_ERROR;
386 }
387
388+ if (encodings_arr->used) {
389+ size_t j = 0;
390+ for (j = 0; j < encodings_arr->used; j++) {
391+ data_string *ds = (data_string *)encodings_arr->data[j];
392+#ifdef USE_ZLIB
393+ if (NULL != strstr(ds->value->ptr, "gzip"))
394+ s->allowed_encodings |= HTTP_ACCEPT_ENCODING_GZIP;
395+ if (NULL != strstr(ds->value->ptr, "deflate"))
396+ s->allowed_encodings |= HTTP_ACCEPT_ENCODING_DEFLATE;
397+ /*
398+ if (NULL != strstr(ds->value->ptr, "compress"))
399+ s->allowed_encodings |= HTTP_ACCEPT_ENCODING_COMPRESS;
400+ */
401+#endif
402+#ifdef USE_BZ2LIB
403+ if (NULL != strstr(ds->value->ptr, "bzip2"))
404+ s->allowed_encodings |= HTTP_ACCEPT_ENCODING_BZIP2;
405+#endif
406+ }
407+ } else {
408+ /* default encodings */
409+ s->allowed_encodings = 0
410+#ifdef USE_ZLIB
411+ | HTTP_ACCEPT_ENCODING_GZIP | HTTP_ACCEPT_ENCODING_DEFLATE
412+#endif
413+#ifdef USE_BZ2LIB
414+ | HTTP_ACCEPT_ENCODING_BZIP2
415+#endif
416+ ;
417+ }
418+
419+ array_free(encodings_arr);
420+
421 if (!buffer_is_empty(s->compress_cache_dir)) {
422 struct stat st;
423 mkdir_recursive(s->compress_cache_dir->ptr);
424@@ -587,6 +625,7 @@
425 PATCH(compress_cache_dir);
426 PATCH(compress);
427 PATCH(compress_max_filesize);
428+ PATCH(allowed_encodings);
429
430 /* skip the first, the global context */
431 for (i = 1; i < srv->config_context->used; i++) {
432@@ -606,6 +645,8 @@
433 PATCH(compress);
434 } else if (buffer_is_equal_string(du->key, CONST_STR_LEN("compress.max-filesize"))) {
435 PATCH(compress_max_filesize);
436+ } else if (buffer_is_equal_string(du->key, CONST_STR_LEN("compress.allowed-encodings"))) {
437+ PATCH(allowed_encodings);
438 }
439 }
440 }
441@@ -668,27 +709,21 @@
442 if (NULL != (ds = (data_string *)array_get_element(con->request.headers, "Accept-Encoding"))) {
443 int accept_encoding = 0;
444 char *value = ds->value->ptr;
445- int srv_encodings = 0;
446 int matched_encodings = 0;
447
448 /* get client side support encodings */
449+#ifdef USE_ZLIB
450 if (NULL != strstr(value, "gzip")) accept_encoding |= HTTP_ACCEPT_ENCODING_GZIP;
451 if (NULL != strstr(value, "deflate")) accept_encoding |= HTTP_ACCEPT_ENCODING_DEFLATE;
452 if (NULL != strstr(value, "compress")) accept_encoding |= HTTP_ACCEPT_ENCODING_COMPRESS;
453+#endif
454+#ifdef USE_BZ2LIB
455 if (NULL != strstr(value, "bzip2")) accept_encoding |= HTTP_ACCEPT_ENCODING_BZIP2;
456+#endif
457 if (NULL != strstr(value, "identity")) accept_encoding |= HTTP_ACCEPT_ENCODING_IDENTITY;
458
459- /* get server side supported ones */
460-#ifdef USE_BZ2LIB
461- srv_encodings |= HTTP_ACCEPT_ENCODING_BZIP2;
462-#endif
463-#ifdef USE_ZLIB
464- srv_encodings |= HTTP_ACCEPT_ENCODING_GZIP;
465- srv_encodings |= HTTP_ACCEPT_ENCODING_DEFLATE;
466-#endif
467-
468 /* find matching entries */
469- matched_encodings = accept_encoding & srv_encodings;
470+ matched_encodings = accept_encoding & p->conf.allowed_encodings;
471
472 if (matched_encodings) {
473 const char *dflt_gzip = "gzip";
709c1a0b
ER
474Index: src/mod_auth.c
475===================================================================
2ed0f534
ER
476--- src/mod_auth.c (.../tags/lighttpd-1.4.20) (revision 2336)
477+++ src/mod_auth.c (.../branches/lighttpd-1.4.x) (revision 2336)
709c1a0b
ER
478@@ -115,7 +115,7 @@
479 PATCH(auth_ldap_starttls);
480 PATCH(auth_ldap_allow_empty_pw);
481 #ifdef USE_LDAP
482- PATCH(ldap);
483+ p->anon_conf = s;
484 PATCH(ldap_filter_pre);
485 PATCH(ldap_filter_post);
486 #endif
487@@ -149,7 +149,7 @@
488 } else if (buffer_is_equal_string(du->key, CONST_STR_LEN("auth.backend.ldap.hostname"))) {
489 PATCH(auth_ldap_hostname);
490 #ifdef USE_LDAP
491- PATCH(ldap);
492+ p->anon_conf = s;
493 #endif
494 } else if (buffer_is_equal_string(du->key, CONST_STR_LEN("auth.backend.ldap.base-dn"))) {
495 PATCH(auth_ldap_basedn);
496@@ -527,7 +527,7 @@
54b68997 497 }
54b68997
ER
498 }
499
709c1a0b
ER
500- switch(s->auth_backend) {
501+ switch(s->auth_ldap_hostname->used) {
502 case AUTH_BACKEND_LDAP: {
503 handler_t ret = auth_ldap_init(srv, s);
504 if (ret == HANDLER_ERROR)
505@@ -554,6 +554,9 @@
506 #endif
507
508 if (s->auth_ldap_hostname->used) {
509+ /* free old context */
510+ if (NULL != s->ldap) ldap_unbind_s(s->ldap);
511+
512 if (NULL == (s->ldap = ldap_init(s->auth_ldap_hostname->ptr, LDAP_PORT))) {
513 log_error_write(srv, __FILE__, __LINE__, "ss", "ldap ...", strerror(errno));
514
515Index: src/mod_fastcgi.c
516===================================================================
2ed0f534
ER
517--- src/mod_fastcgi.c (.../tags/lighttpd-1.4.20) (revision 2336)
518+++ src/mod_fastcgi.c (.../branches/lighttpd-1.4.x) (revision 2336)
709c1a0b
ER
519@@ -3608,47 +3608,50 @@
520 "handling it in mod_fastcgi");
521 }
522
523- /* the prefix is the SCRIPT_NAME,
524- * everything from start to the next slash
525- * this is important for check-local = "disable"
526- *
527- * if prefix = /admin.fcgi
528- *
529- * /admin.fcgi/foo/bar
530- *
531- * SCRIPT_NAME = /admin.fcgi
532- * PATH_INFO = /foo/bar
533- *
534- * if prefix = /fcgi-bin/
535- *
536- * /fcgi-bin/foo/bar
537- *
538- * SCRIPT_NAME = /fcgi-bin/foo
539- * PATH_INFO = /bar
540- *
541- * if prefix = /, and fix-root-path-name is enable
542- *
543- * /fcgi-bin/foo/bar
544- *
545- * SCRIPT_NAME = /fcgi-bin/foo
546- * PATH_INFO = /bar
547- *
548- */
549+ /* do not split path info for authorizer */
550+ if (host->mode != FCGI_AUTHORIZER) {
551+ /* the prefix is the SCRIPT_NAME,
552+ * everything from start to the next slash
553+ * this is important for check-local = "disable"
554+ *
555+ * if prefix = /admin.fcgi
556+ *
557+ * /admin.fcgi/foo/bar
558+ *
559+ * SCRIPT_NAME = /admin.fcgi
560+ * PATH_INFO = /foo/bar
561+ *
562+ * if prefix = /fcgi-bin/
563+ *
564+ * /fcgi-bin/foo/bar
565+ *
566+ * SCRIPT_NAME = /fcgi-bin/foo
567+ * PATH_INFO = /bar
568+ *
569+ * if prefix = /, and fix-root-path-name is enable
570+ *
571+ * /fcgi-bin/foo/bar
572+ *
573+ * SCRIPT_NAME = /fcgi-bin/foo
574+ * PATH_INFO = /bar
575+ *
576+ */
577
578- /* the rewrite is only done for /prefix/? matches */
579- if (extension->key->ptr[0] == '/' &&
580- con->uri.path->used > extension->key->used &&
581- NULL != (pathinfo = strchr(con->uri.path->ptr + extension->key->used - 1, '/'))) {
582- /* rewrite uri.path and pathinfo */
583+ /* the rewrite is only done for /prefix/? matches */
584+ if (extension->key->ptr[0] == '/' &&
585+ con->uri.path->used > extension->key->used &&
586+ NULL != (pathinfo = strchr(con->uri.path->ptr + extension->key->used - 1, '/'))) {
587+ /* rewrite uri.path and pathinfo */
588
589- buffer_copy_string(con->request.pathinfo, pathinfo);
590+ buffer_copy_string(con->request.pathinfo, pathinfo);
591
592- con->uri.path->used -= con->request.pathinfo->used - 1;
593- con->uri.path->ptr[con->uri.path->used - 1] = '\0';
594- } else if (host->fix_root_path_name && extension->key->ptr[0] == '/' && extension->key->ptr[1] == '\0') {
595- buffer_copy_string(con->request.pathinfo, con->uri.path->ptr);
596- con->uri.path->used = 1;
597- con->uri.path->ptr[con->uri.path->used - 1] = '\0';
598+ con->uri.path->used -= con->request.pathinfo->used - 1;
599+ con->uri.path->ptr[con->uri.path->used - 1] = '\0';
600+ } else if (host->fix_root_path_name && extension->key->ptr[0] == '/' && extension->key->ptr[1] == '\0') {
601+ buffer_copy_string(con->request.pathinfo, con->uri.path->ptr);
602+ con->uri.path->used = 1;
603+ con->uri.path->ptr[con->uri.path->used - 1] = '\0';
604+ }
54b68997 605 }
54b68997 606 }
709c1a0b
ER
607 } else {
608Index: src/proc_open.c
609===================================================================
2ed0f534
ER
610--- src/proc_open.c (.../tags/lighttpd-1.4.20) (revision 2336)
611+++ src/proc_open.c (.../branches/lighttpd-1.4.x) (revision 2336)
709c1a0b
ER
612@@ -287,32 +287,33 @@
613 }
614 /* }}} */
615 /* {{{ proc_open_buffer */
616-int proc_open_buffer(proc_handler_t *proc, const char *command, buffer *in, buffer *out, buffer *err) {
617+int proc_open_buffer(const char *command, buffer *in, buffer *out, buffer *err) {
618+ proc_handler_t proc;
54b68997 619
709c1a0b
ER
620- UNUSED(err);
621-
622- if (proc_open(proc, command) != 0) {
623+ if (proc_open(&proc, command) != 0) {
624 return -1;
625 }
54b68997 626
709c1a0b
ER
627 if (in) {
628- if (write(proc->in.fd, (void *)in->ptr, in->used) < 0) {
629+ if (write(proc.in.fd, (void *)in->ptr, in->used) < 0) {
630 perror("error writing pipe");
631 return -1;
632 }
633 }
634- pipe_close(&proc->in);
635+ pipe_close(&proc.in);
54b68997 636
709c1a0b
ER
637 if (out) {
638- proc_read_fd_to_buffer(proc->out.fd, out);
639+ proc_read_fd_to_buffer(proc.out.fd, out);
640 }
641- pipe_close(&proc->out);
642+ pipe_close(&proc.out);
54b68997 643
709c1a0b
ER
644 if (err) {
645- proc_read_fd_to_buffer(proc->err.fd, err);
646+ proc_read_fd_to_buffer(proc.err.fd, err);
54b68997 647 }
709c1a0b
ER
648- pipe_close(&proc->err);
649+ pipe_close(&proc.err);
54b68997 650
709c1a0b
ER
651+ proc_close(&proc);
652+
54b68997
ER
653 return 0;
654 }
709c1a0b
ER
655 /* }}} */
656@@ -366,7 +367,7 @@
657 RESET();
658
659 fprintf(stdout, "test: echo 321 with read\n"); fflush(stdout);
660- if (proc_open_buffer(&proc, "echo 321", NULL, out, err) != 0) {
661+ if (proc_open_buffer("echo 321", NULL, out, err) != 0) {
662 ERROR_OUT();
663 }
664 fprintf(stdout, "result: ->%s<-\n\n", out->ptr); fflush(stdout);
665@@ -374,7 +375,7 @@
666
667 fprintf(stdout, "test: echo 123 | " CMD_CAT "\n"); fflush(stdout);
668 buffer_copy_string_len(in, CONST_STR_LEN("123\n"));
669- if (proc_open_buffer(&proc, CMD_CAT, in, out, err) != 0) {
670+ if (proc_open_buffer(CMD_CAT, in, out, err) != 0) {
671 ERROR_OUT();
672 }
673 fprintf(stdout, "result: ->%s<-\n\n", out->ptr); fflush(stdout);
674Index: src/proc_open.h
54b68997 675===================================================================
2ed0f534
ER
676--- src/proc_open.h (.../tags/lighttpd-1.4.20) (revision 2336)
677+++ src/proc_open.h (.../branches/lighttpd-1.4.x) (revision 2336)
709c1a0b 678@@ -22,4 +22,4 @@
54b68997 679
709c1a0b
ER
680 int proc_close(proc_handler_t *ht);
681 int proc_open(proc_handler_t *ht, const char *command);
682-int proc_open_buffer(proc_handler_t *ht, const char *command, buffer *in, buffer *out, buffer *err);
683+int proc_open_buffer(const char *command, buffer *in, buffer *out, buffer *err);
2ed0f534
ER
684Index: tests/mod-compress.conf
685===================================================================
686--- tests/mod-compress.conf (.../tags/lighttpd-1.4.20) (revision 0)
687+++ tests/mod-compress.conf (.../branches/lighttpd-1.4.x) (revision 2336)
688@@ -0,0 +1,32 @@
689+debug.log-request-handling = "enable"
690+debug.log-response-header = "disable"
691+debug.log-request-header = "disable"
692+
693+server.document-root = env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/"
694+server.pid-file = env.SRCDIR + "/tmp/lighttpd/lighttpd.pid"
695+
696+## bind to port (default: 80)
697+server.port = 2048
698+
699+## bind to localhost (default: all interfaces)
700+server.bind = "localhost"
701+server.errorlog = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.error.log"
702+server.name = "www.example.org"
703+
704+server.modules = (
705+ "mod_compress"
706+)
707+
708+######################## MODULE CONFIG ############################
709+
710+mimetype.assign = (
711+ ".html" => "text/html",
712+ ".txt" => "text/plain",
713+)
714+
715+$HTTP["host"] == "cache.example.org" {
716+ compress.cache-dir = env.SRCDIR + "/tmp/lighttpd/cache/compress/"
717+}
718+compress.filetype = ("text/plain", "text/html")
719+
720+compress.allowed-encodings = ( "gzip", "deflate" )
709c1a0b
ER
721Index: tests/mod-fastcgi.t
722===================================================================
2ed0f534
ER
723--- tests/mod-fastcgi.t (.../tags/lighttpd-1.4.20) (revision 2336)
724+++ tests/mod-fastcgi.t (.../branches/lighttpd-1.4.x) (revision 2336)
709c1a0b
ER
725@@ -7,7 +7,7 @@
726 }
54b68997 727
709c1a0b
ER
728 use strict;
729-use Test::More tests => 49;
730+use Test::More tests => 50;
731 use LightyTest;
54b68997 732
709c1a0b
ER
733 my $tf = LightyTest->new();
734@@ -215,7 +215,7 @@
54b68997 735 }
a34aaa25 736
709c1a0b
ER
737 SKIP: {
738- skip "no fcgi-auth found", 4 unless -x $tf->{BASEDIR}."/tests/fcgi-auth" || -x $tf->{BASEDIR}."/tests/fcgi-auth.exe";
739+ skip "no fcgi-auth found", 5 unless -x $tf->{BASEDIR}."/tests/fcgi-auth" || -x $tf->{BASEDIR}."/tests/fcgi-auth.exe";
740
741 $tf->{CONFIGFILE} = 'fastcgi-auth.conf';
742 ok($tf->start_proc == 0, "Starting lighttpd with $tf->{CONFIGFILE}") or die();
743@@ -235,6 +235,14 @@
744 $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 403 } ];
745 ok($tf->handle_http($t) == 0, 'FastCGI - Auth');
a34aaa25 746
709c1a0b
ER
747+ $t->{REQUEST} = ( <<EOF
748+GET /expire/access.txt?ok HTTP/1.0
749+Host: www.example.org
750+EOF
751+ );
752+ $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ];
753+ ok($tf->handle_http($t) == 0, 'FastCGI - Auth in subdirectory');
754+
755 ok($tf->stop_proc == 0, "Stopping lighttpd");
756 }
09cf44bb 757
709c1a0b 758Index: tests/fastcgi-auth.conf
54b68997 759===================================================================
2ed0f534
ER
760--- tests/fastcgi-auth.conf (.../tags/lighttpd-1.4.20) (revision 2336)
761+++ tests/fastcgi-auth.conf (.../branches/lighttpd-1.4.x) (revision 2336)
709c1a0b
ER
762@@ -89,6 +89,7 @@
763 "bin-path" => env.SRCDIR + "/fcgi-auth",
764 "mode" => "authorizer",
765 "docroot" => env.SRCDIR + "/tmp/lighttpd/servers/www.example.org/pages/",
766+ "check-local" => "disable",
54b68997 767
709c1a0b
ER
768 )
769 )
2ed0f534
ER
770Index: tests/mod-compress.t
771===================================================================
772--- tests/mod-compress.t (.../tags/lighttpd-1.4.20) (revision 2336)
773+++ tests/mod-compress.t (.../branches/lighttpd-1.4.x) (revision 2336)
774@@ -8,12 +8,14 @@
775
776 use strict;
777 use IO::Socket;
778-use Test::More tests => 10;
779+use Test::More tests => 11;
780 use LightyTest;
781
782 my $tf = LightyTest->new();
783 my $t;
784
785+$tf->{CONFIGFILE} = 'mod-compress.conf';
786+
787 ok($tf->start_proc == 0, "Starting lighttpd") or die();
788
789 $t->{REQUEST} = ( <<EOF
790@@ -88,5 +90,14 @@
791 $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, '+Vary' => '', 'Content-Type' => "text/plain" } ];
792 ok($tf->handle_http($t) == 0, 'Empty Accept-Encoding');
793
794+$t->{REQUEST} = ( <<EOF
795+GET /index.txt HTTP/1.0
796+Accept-Encoding: bzip2, gzip, deflate
797+Host: cache.example.org
798+EOF
799+ );
800+$t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, '+Vary' => '', 'Content-Encoding' => 'gzip', 'Content-Type' => "text/plain" } ];
801+ok($tf->handle_http($t) == 0, 'bzip2 requested but disabled');
802
803+
804 ok($tf->stop_proc == 0, "Stopping lighttpd");
805Index: doc/compress.txt
806===================================================================
807--- doc/compress.txt (.../tags/lighttpd-1.4.20) (revision 2336)
808+++ doc/compress.txt (.../branches/lighttpd-1.4.x) (revision 2336)
809@@ -6,13 +6,7 @@
810 Module: mod_compress
811 --------------------
812
813-:Author: Jan Kneschke
814-:Date: $Date$
815-:Revision: $Revision$
816
817-:abstract:
818- a nice, short abstrace about the module
819-
820 .. meta::
821 :keywords: lighttpd, compress
822
823@@ -22,16 +16,57 @@
824 ===========
825
826 Output compression reduces the network load and can improve the overall
827-throughput of the webserver.
828+throughput of the webserver. All major http-clients support compression by
829+announcing it in the Accept-Encoding header. This is used to negotiate the
830+most suitable compression method. We support deflate, gzip and bzip2.
831
832-Only static content is supported up to now.
833+deflate (RFC1950, RFC1951) and gzip (RFC1952) depend on zlib while bzip2
834+depends on libbzip2. bzip2 is only supported by lynx and some other console
835+text-browsers.
836
837-The server negotiates automaticly which compression method is used.
838-Supported are gzip, deflate, bzip.
839+We currently limit to compression support to static files.
840
841+Caching
842+-------
843+
844+mod_compress can store compressed files on disk to optimize the compression
845+on a second request away. As soon as compress.cache-dir is set the files are
846+compressed.
847+
848+(You will need to create the cache directory if it doesn't already exist. The web server will not do this for you. The directory will also need the proper ownership. For Debian/Ubuntu the user and group ids should both be www-data.)
849+
850+The names of the cache files are made of the filename, the compression method
851+and the etag associated to the file.
852+
853+Cleaning the cache is left to the user. A cron job deleting files older than
854+10 days could do it: ::
855+
856+ find /var/www/cache -type f -mtime +10 | xargs -r rm
857+
858+Limitations
859+-----------
860+
861+The module limits the compression of files to files smaller than 128 MByte and
862+larger than 128 Byte.
863+
864+The lower limit is set as small files tend to become larger by compressing due
865+to the compression headers, the upper limit is set to work sensibly with
866+memory and cpu-time.
867+
868+Directories containing a tilde ('~') are not created automatically (See ticket
869+#113). To enable compression for user dirs you have to create the directories
870+by hand in the cache directory.
871+
872 Options
873 =======
874
875+compress.allowed-encodings
876+ override default set of allowed encodings
877+
878+ e.g.: ::
879+
880+ compress.allowed-encodings = ("bzip2", "gzip", "deflate")
881+
882 compress.cache-dir
883 name of the directory where compressed content will be cached
884
885@@ -47,20 +82,111 @@
886 Default: not set, compress the file for every request
887
888 compress.filetype
889- mimetypes where might get compressed
890+ mimetypes which might get compressed
891
892 e.g.: ::
893
894 compress.filetype = ("text/plain", "text/html")
895
896+ Keep in mind that compressed JavaScript and CSS files are broken in some
897+ browsers. Not setting any filetypes will result in no files being compressed.
898+
899+ NOTE: You have to specify the full mime-type! If you also define a charset, for example, you have to use "text/plain; charset=utf-8" instead of just "text/plain".
900+
901 Default: not set
902
903+compress.max-filesize
904+ maximum size of the original file to be compressed kBytes.
905
906+ This is meant to protect the server against DoSing as compressing large
907+ (let's say 1Gbyte) takes a lot of time and would delay the whole operation
908+ of the server.
909+
910+ There is a hard upper limit of 128Mbyte.
911+
912+ Default: unlimited (== hard-limit of 128MByte)
913+
914+Display compressed files
915+========================
916+
917+If you enable mod_compress, and you want to force clients to uncompress and display compressed text files, please force mimetype to nothing.
918+Exemple :
919+If you want to add headers for uncompress and display diff.gz files , add this section in your conf : ::
920+
921+ $HTTP["url"] =~ "\.diff\.gz" {
922+ setenv.add-response-header = ( "Content-Encoding" => "gzip" )
923+ mimetype.assign = ()
924+ }
925+
926+
927 Compressing Dynamic Content
928 ===========================
929
930+PHP
931+---
932+
933 To compress dynamic content with PHP please enable ::
934
935 zlib.output_compression = 1
936+ zlib.output_handler = On
937
938 in the php.ini as PHP provides compression support by itself.
939+
940+mod_compress of lighttpd 1.5 r1992 may not set correct Content-Encoding with php-fcgi. A solution to that problem would be:
941+
942+1.disable mod_compress when request a php file::
943+
944+ $HTTP["url"] !~ "\.php$" {
945+ compress.filetype = ("text/plain", "text/html", "text/javascript", "text/css", "text/xml")
946+ }
947+
948+2.enable mod_setenv of your lighttpd::
949+
950+ server.modules += ( "mod_setenv" )
951+
952+3.manually set Content-Encoding::
953+
954+ $HTTP["url"] =~ "\.php$" {
955+ setenv.add-response-header = ( "Content-Encoding" => "gzip")
956+ }
957+
958+
959+TurboGears
960+----------
961+
962+To compress dynamic content with TurboGears please enable ::
963+
964+ [/]
965+ gzip_filter.on = True
966+ gzip_filter.mime_types = ["application/x-javascript", "text/javascript", "text/html", "text/css", "text/plain"]
967+
968+in the config/app.cfg file in your TurboGears application. The above lines should already be in the file. You just need to remove the comment symbol in front of the lines to make them active.
969+
970+Django
971+------
972+
973+To compress dynamic content with Django please enable the GZipMiddleware ::
974+
975+ MIDDLEWARE_CLASSES = (
976+ 'django.middleware.gzip.GZipMiddleware',
977+ ...
978+ )
979+
980+in the settings.py file in your Django project.
981+
982+Catalyst
983+--------
984+
985+To compress dynamic content with Perl/Catalyst, simply use the Catalyst::Plugin::Compress::Gzip module available on CPAN ::
986+
987+ use Catalyst qw(
988+ Compress::Gzip
989+ ...
990+ );
991+
992+in your main package (MyApp.pm). Further configuration is not required.
993+
994+}}}
995+
996+
997+
1e1cc0d1
ER
998Index: SConstruct
999===================================================================
2ed0f534
ER
1000--- SConstruct (.../tags/lighttpd-1.4.20) (revision 2336)
1001+++ SConstruct (.../branches/lighttpd-1.4.x) (revision 2336)
49b4da39
ER
1002@@ -5,7 +5,7 @@
1003 from stat import *
1004
1005 package = 'lighttpd'
709c1a0b
ER
1006-version = '1.4.20'
1007+version = '1.4.21'
10dbb8f0 1008
49b4da39
ER
1009 def checkCHeaders(autoconf, hdrs):
1010 p = re.compile('[^A-Z0-9]')
ad6a5263
ER
1011Index: Makefile.am
1012===================================================================
2ed0f534
ER
1013--- Makefile.am (.../tags/lighttpd-1.4.20) (revision 2336)
1014+++ Makefile.am (.../branches/lighttpd-1.4.x) (revision 2336)
709c1a0b
ER
1015@@ -1,4 +1,4 @@
1016-SUBDIRS=src doc tests cygwin openwrt
1017+SUBDIRS=src doc tests
1018
1019 EXTRA_DIST=autogen.sh SConstruct
ad6a5263 1020
cc1350fa
ER
1021Index: NEWS
1022===================================================================
2ed0f534
ER
1023--- NEWS (.../tags/lighttpd-1.4.20) (revision 2336)
1024+++ NEWS (.../branches/lighttpd-1.4.x) (revision 2336)
1025@@ -3,8 +3,24 @@
cc1350fa
ER
1026 NEWS
1027 ====
1028
709c1a0b
ER
1029-- 1.4.20 -
1030+- 1.4.21 -
1031
1032+ * Fix base64 decoding in mod_auth (#1757, thx guido)
1033+ * Fix mod_cgi segfault when bound to unix domain socket (#653)
1034+ * Do not rely on ioctl FIONREAD (#673)
1035+ * Now really fix mod auth ldap (#1066)
1036+ * Fix leaving zombie process with include_shell (#1777)
1037+ * Removed debian/, openwrt/ and cygwin/; they weren't kept up-to-date, and we decided to remove dist. specific stuff
1038+ * Try to convert string options to shorts for numeric options in config file; allows to use env-vars for numeric options. (#1159, thx andrewb)
1039+ * Do not cache default vhost in mod_simple_vhost (#709)
1040+ * Trust pcre-config, do not check for pcre manually (#1769)
1041+ * Fix fastcgi authorization in subdirectories with check-local=disabled; don't split pathinfo for authorizer. (#963)
2ed0f534
ER
1042+ * Add possibility to disable methods in mod_compress (#1773)
1043+ * Fix duplicate connection keep-alive/transfer-encoding headers (#960)
1044+ * Fixed fix for round-robin in mod_proxy (forgot to increment the index) (#1715)
709c1a0b
ER
1045+
1046+- 1.4.20 - 2008-09-30
1047+
1048 * Fix mod_compress to compile with old gcc version (#1592)
1049 * Fix mod_extforward to compile with old gcc version (#1591)
1050 * Update documentation for #1587
2ed0f534
ER
1051@@ -52,7 +68,7 @@
1052 * decode url before matching in mod_rewrite (#1720)
1053 * fixed conditional patching of ldap filter (#1564)
1054 * Match headers case insensitive in response (removing of X-{Sendfile,LIGHTTPD-*}, catching Date/Server)
1055- * fixed bug with case-insensitive filenames in mod_userdir (#1589), spotted by "anders1"
1056+ * fixed bug with case-insensitive filenames in mod_userdir (#1589), spotted by "anders1" (CVE-2008-4360)
1057 * fixed format string bugs in mod_accesslog for SYSLOG
1058 * replaced fprintf with log_error_write in fastcgi debug
1059 * fixed mem leak in ssi expression parser (#1753), thx Take5k
1060@@ -62,9 +78,9 @@
1061 * fix splitting of auth-ldap filter
1062 * workaround ldap connection leak if a ldap connection failed (restarting ldap)
1063 * fix auth.backend.ldap.bind-dn/pw problems (only read from global context for temporary ldap reconnects, thx ruskie)
1064- * fix memleak in request header parsing (#1774, thx qhy)
1065+ * fix memleak in request header parsing (#1774, thx qhy) (CVE-2008-4298)
1066 * fix mod_rewrite memleak/endless loop detection (#1775, thx phy - again!)
1067- * use decoded url for matching in mod_redirect (#1720)
1068+ * use decoded url for matching in mod_redirect (#1720) (CVE-2008-4359)
1069
1070 - 1.4.19 - 2008-03-10
1071
a34aaa25
ER
1072
1073Property changes on: .
1074___________________________________________________________________
709c1a0b
ER
1075Modified: bzr:revision-info
1076 - timestamp: 2008-09-23 21:04:22.819999933 +0200
54b68997
ER
1077committer: Stefan Bühler <stbuehler@web.de>
1078properties:
1079 branch-nick: lighttpd-1.4.x
1080
2ed0f534 1081 + timestamp: 2008-10-06 00:44:46.096999884 +0200
709c1a0b
ER
1082committer: Stefan Bühler <stbuehler@web.de>
1083properties:
1084 branch-nick: lighttpd-1.4.x
2ed0f534 1085 rebase-of: stbuehler@web.de-20081005224446-yvb2zjumu0opxywc
709c1a0b
ER
1086
1087Modified: bzr:revision-id:v3-trunk0
1088 - 1127 stbuehler@web.de-20080728081644-j4cxnhduw8kbt8um
10891128 stbuehler@web.de-20080728084246-axvxdtjsrratxixs
10901129 stbuehler@web.de-20080729211700-s8v6nq2cu06qesls
10911130 stbuehler@web.de-20080729211726-4yxb6e5dva1cn0lz
10921131 stbuehler@web.de-20080729211750-4ulzigswx17uciyu
10931132 stbuehler@web.de-20080729211850-nliz3kd0m576ztuu
10941133 stbuehler@web.de-20080730163440-dg2y2sbf0u4grmn4
10951134 stbuehler@web.de-20080730173952-kiutzg6geqy7mick
10961135 stbuehler@web.de-20080730193616-9kc2ms7rrhv1lkn7
10971136 stbuehler@web.de-20080730211457-z4a6uth1y29glbqh
10981137 stbuehler@web.de-20080730213517-b6sjcrdwbmipl334
10991138 stbuehler@web.de-20080731102617-2xw8unjfqic7lsew
11001139 stbuehler@web.de-20080731102703-q4tu5a6em9y8xdg0
11011140 stbuehler@web.de-20080731102729-l6vn5b05w9swqbg5
11021141 stbuehler@web.de-20080731102756-oj3d4tnk0l90mj77
11031142 stbuehler@web.de-20080731204442-blw14cj2fkr3l8ly
11041143 stbuehler@web.de-20080731204508-imtfnurf922mg7tj
11051144 stbuehler@web.de-20080801112347-girnwswdkwm8wuip
11061145 stbuehler@web.de-20080801161245-kx1temr529o7xko9
11071146 stbuehler@web.de-20080801175332-oc9e7x8edn1owcc0
11081147 stbuehler@web.de-20080801183454-5i66v0gsdv0cgmia
11091148 stbuehler@web.de-20080801192849-6zklfbb832sx0hvr
11101149 stbuehler@web.de-20080801203119-o16elp8w854s6lol
11111150 stbuehler@web.de-20080802162146-a4v57svc788pwdsv
11121151 stbuehler@web.de-20080802162202-9udlc1wuwt09pyh2
11131152 stbuehler@web.de-20080804135803-yuor9ze06px7qta4
11141153 stbuehler@web.de-20080812194728-fupt781o6q058unh
11151154 stbuehler@web.de-20080818162116-piz0ukqsaecv2li2
11161155 stbuehler@web.de-20080818235700-94t0xc6ml70zojwq
11171156 stbuehler@web.de-20080819163650-1qhwsqszr78cr4xx
11181157 stbuehler@web.de-20080819163757-1qq3t1f1wj69t8xs
11191158 stbuehler@web.de-20080819163914-rklhkurg8apv85l2
11201159 stbuehler@web.de-20080819163953-tlqew751e43phf5b
11211160 stbuehler@web.de-20080819164108-8ogh68sm1uyteawe
11221161 stbuehler@web.de-20080819173911-w5bqpb7cp9jmdqye
11231162 stbuehler@web.de-20080819222242-c0ta5gnli9p3j35a
11241163 stbuehler@web.de-20080820100730-g1bwdh4nqb53ag9u
11251164 stbuehler@web.de-20080820100752-9pggugdyfnnps8qu
11261165 stbuehler@web.de-20080820164258-v2j00motsrsc5esp
11271166 stbuehler@web.de-20080827144628-hi9hf4ch3n1wf9ao
11281167 stbuehler@web.de-20080827144903-tfxu4yehlyu5kegc
11291168 stbuehler@web.de-20080827155155-7mt92orehbxkh2lh
11301169 stbuehler@web.de-20080917142048-zbcwpk39q9ewd516
11311170 stbuehler@web.de-20080917142300-16gzt21x4nbjtj87
11321171 stbuehler@web.de-20080919160134-385anjnd3txxdw3x
11331172 stbuehler@web.de-20080920134142-fvvwaw2ys51dg4rj
11341173 stbuehler@web.de-20080921153311-1f7rn01atdilmxmy
11351174 stbuehler@web.de-20080922101346-wel327kjmykkpvmp
11361175 stbuehler@web.de-20080923190422-uow06l38ndue36o4
1137
54b68997
ER
1138 + 1127 stbuehler@web.de-20080728081644-j4cxnhduw8kbt8um
11391128 stbuehler@web.de-20080728084246-axvxdtjsrratxixs
11401129 stbuehler@web.de-20080729211700-s8v6nq2cu06qesls
11411130 stbuehler@web.de-20080729211726-4yxb6e5dva1cn0lz
11421131 stbuehler@web.de-20080729211750-4ulzigswx17uciyu
11431132 stbuehler@web.de-20080729211850-nliz3kd0m576ztuu
11441133 stbuehler@web.de-20080730163440-dg2y2sbf0u4grmn4
11451134 stbuehler@web.de-20080730173952-kiutzg6geqy7mick
11461135 stbuehler@web.de-20080730193616-9kc2ms7rrhv1lkn7
11471136 stbuehler@web.de-20080730211457-z4a6uth1y29glbqh
11481137 stbuehler@web.de-20080730213517-b6sjcrdwbmipl334
11491138 stbuehler@web.de-20080731102617-2xw8unjfqic7lsew
11501139 stbuehler@web.de-20080731102703-q4tu5a6em9y8xdg0
11511140 stbuehler@web.de-20080731102729-l6vn5b05w9swqbg5
11521141 stbuehler@web.de-20080731102756-oj3d4tnk0l90mj77
11531142 stbuehler@web.de-20080731204442-blw14cj2fkr3l8ly
11541143 stbuehler@web.de-20080731204508-imtfnurf922mg7tj
11551144 stbuehler@web.de-20080801112347-girnwswdkwm8wuip
11561145 stbuehler@web.de-20080801161245-kx1temr529o7xko9
11571146 stbuehler@web.de-20080801175332-oc9e7x8edn1owcc0
11581147 stbuehler@web.de-20080801183454-5i66v0gsdv0cgmia
11591148 stbuehler@web.de-20080801192849-6zklfbb832sx0hvr
11601149 stbuehler@web.de-20080801203119-o16elp8w854s6lol
11611150 stbuehler@web.de-20080802162146-a4v57svc788pwdsv
11621151 stbuehler@web.de-20080802162202-9udlc1wuwt09pyh2
11631152 stbuehler@web.de-20080804135803-yuor9ze06px7qta4
11641153 stbuehler@web.de-20080812194728-fupt781o6q058unh
11651154 stbuehler@web.de-20080818162116-piz0ukqsaecv2li2
11661155 stbuehler@web.de-20080818235700-94t0xc6ml70zojwq
11671156 stbuehler@web.de-20080819163650-1qhwsqszr78cr4xx
11681157 stbuehler@web.de-20080819163757-1qq3t1f1wj69t8xs
11691158 stbuehler@web.de-20080819163914-rklhkurg8apv85l2
11701159 stbuehler@web.de-20080819163953-tlqew751e43phf5b
11711160 stbuehler@web.de-20080819164108-8ogh68sm1uyteawe
11721161 stbuehler@web.de-20080819173911-w5bqpb7cp9jmdqye
11731162 stbuehler@web.de-20080819222242-c0ta5gnli9p3j35a
11741163 stbuehler@web.de-20080820100730-g1bwdh4nqb53ag9u
11751164 stbuehler@web.de-20080820100752-9pggugdyfnnps8qu
11761165 stbuehler@web.de-20080820164258-v2j00motsrsc5esp
11771166 stbuehler@web.de-20080827144628-hi9hf4ch3n1wf9ao
11781167 stbuehler@web.de-20080827144903-tfxu4yehlyu5kegc
11791168 stbuehler@web.de-20080827155155-7mt92orehbxkh2lh
11801169 stbuehler@web.de-20080917142048-zbcwpk39q9ewd516
11811170 stbuehler@web.de-20080917142300-16gzt21x4nbjtj87
709c1a0b
ER
11821171 stbuehler@web.de-20080919160134-385anjnd3txxdw3x
11831172 stbuehler@web.de-20080920134142-fvvwaw2ys51dg4rj
11841173 stbuehler@web.de-20080921153311-1f7rn01atdilmxmy
11851174 stbuehler@web.de-20080922101346-wel327kjmykkpvmp
11861175 stbuehler@web.de-20080923190422-uow06l38ndue36o4
11871176 stbuehler@web.de-20080930112012-53jby2m8xslmd1hm
11881177 stbuehler@web.de-20080930134824-j9q72rwuiczzof5k
11891178 stbuehler@web.de-20080930142037-32pb6m3zjcwryw1w
11901179 stbuehler@web.de-20080930142756-ueovgoshyb996bce
11911180 stbuehler@web.de-20080930152935-1zfy67brol3xdbc0
11921181 stbuehler@web.de-20080930193919-13n2q4c6fbgw0dkx
11931182 stbuehler@web.de-20080930211152-4hmgs95wyg2deol7
11941183 stbuehler@web.de-20081001132402-hxnyu6yzyk3mjf4d
11951184 stbuehler@web.de-20081001155102-qf0mmu2kkpgr7xf0
11961185 stbuehler@web.de-20081001160009-n67ss0vzlac2y60k
11971186 stbuehler@web.de-20081001200802-l5og517etnneitk0
2ed0f534
ER
11981188 stbuehler@web.de-20081004160711-ygaohrecmutiqlla
11991189 stbuehler@web.de-20081004211932-vq16u26mthbeed7d
12001191 stbuehler@web.de-20081005224446-1bztt6zqrjh8w8fd
54b68997 1201
a34aaa25 1202
This page took 0.214765 seconds and 4 git commands to generate.