Changeset 492
- Timestamp:
- 12/04/06 17:39:08 (2 years ago)
- Files:
-
- cherokee/trunk/ChangeLog (modified) (1 diff)
- cherokee/trunk/cherokee.conf.sample.pre (modified) (1 diff)
- cherokee/trunk/cherokee/config_node.c (modified) (1 diff)
- cherokee/trunk/cherokee/mime.c (modified) (3 diffs)
- cherokee/trunk/cherokee/server.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
cherokee/trunk/ChangeLog
r491 r492 1 1 2006-12-04 Alvaro Lopez Ortega <alvaro@alobbs.com> 2 3 * cherokee/config_node.c (cherokee_config_node_read_list): Now it 4 skips whites before each list entry. "a, b, c" should be "a", "b" 5 and "c" instead of "a", " b" and " c" like previously. 6 7 * cherokee/server.c (configure_server_property): Configuration key 8 "mime_file" has been renamed to "mime_files". Now it accepts a 9 list fo files rather than a single one. 2 10 3 11 * qa/031-Post+urlencoded2.py, qa/101-HugePost.py, cherokee/trunk/cherokee.conf.sample.pre
r481 r492 18 18 server!encoder!gzip!allow = html,html,txt 19 19 server!panic_action = %prefix%/bin/cherokee-panic 20 server!mime_file = %sysconfdir%/cherokee/mime.types 21 server!mime_file = %sysconfdir%/cherokee/mime.compression.types 20 server!mime_files = %sysconfdir%/cherokee/mime.types, %sysconfdir%/cherokee/mime.compression.types 22 21 23 22 # Default virtual server cherokee/trunk/cherokee/config_node.c
r474 r492 483 483 484 484 for (;;) { 485 while ((*ptr == ' ') && (*ptr != '\0')) 486 ptr++; 487 485 488 stop = strchr (ptr, ','); 486 489 if (stop != NULL) *stop = '\0'; cherokee/trunk/cherokee/mime.c
r433 r492 28 28 #include "mime-protected.h" 29 29 #include "util.h" 30 31 #define ENTRIES "mime" 30 32 31 33 … … 120 122 cherokee_buffer_t type = CHEROKEE_BUF_INIT; 121 123 124 TRACE(ENTRIES, "Loading mime file: '%s'\n", filename); 122 125 123 126 ret = cherokee_buffer_read_file (&file, filename); … … 195 198 cherokee_table_add (&mime->mime_table, ext.buf, entry); 196 199 200 TRACE(ENTRIES, "Adding mime '%s' -> '%s'\n", ext.buf, type.buf); 201 197 202 p = tmp; 198 203 } cherokee/trunk/cherokee/server.c
r480 r492 1278 1278 1279 1279 static ret_t 1280 load_mime_file (cherokee_server_t *srv, cherokee_buffer_t *mime_file) 1281 { 1282 ret_t ret; 1280 load_mime_file (char *file, void *data) 1281 { 1282 ret_t ret; 1283 cherokee_server_t *srv = SRV(data); 1283 1284 1284 1285 #ifndef CHEROKEE_EMBEDDED … … 1291 1292 } 1292 1293 1293 ret = cherokee_mime_load_mime_types (srv->mime, mime_file->buf);1294 ret = cherokee_mime_load_mime_types (srv->mime, file); 1294 1295 if (ret < ret_ok) { 1295 PRINT_MSG ("Couldn't load MIME configuration file %s\n", mime_file->buf);1296 PRINT_MSG ("Couldn't load MIME configuration file '%s'\n", file); 1296 1297 return ret; 1297 1298 } … … 1364 1365 cherokee_buffer_add_buffer (&srv->pidfile, &conf->val); 1365 1366 1366 } else if (equal_buf_str (&conf->key, "mime_file ")) {1367 ret = load_mime_file (srv, &conf->val);1367 } else if (equal_buf_str (&conf->key, "mime_files")) { 1368 ret = cherokee_config_node_read_list (conf, NULL, load_mime_file, srv); 1368 1369 if (ret != ret_ok) return ret; 1369 1370