Changeset 268
- Timestamp:
- 04/15/06 21:27:49 (3 years ago)
- Files:
-
- cherokee/branches/0.5/ChangeLog (modified) (1 diff)
- cherokee/branches/0.5/cherokee/module_read_config.c (modified) (1 diff)
- cherokee/branches/0.5/cherokee/read_config_grammar.y (modified) (1 diff)
- cherokee/branches/0.5/cherokee/server-protected.h (modified) (1 diff)
- cherokee/branches/0.5/cherokee/server.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
cherokee/branches/0.5/ChangeLog
r267 r268 1 1 2006-04-15 Alvaro Lopez Ortega <alvaro@alobbs.com> 2 3 * cherokee/read_config_grammar.y, cherokee/server-protected.h, 4 cherokee/module_read_config.c, cherokee/server.c: It was failing 5 to load more than one MimeFile. 2 6 3 7 * cherokee/handler_dirlist.c (cherokee_handler_dirlist_add_headers): cherokee/branches/0.5/cherokee/module_read_config.c
r173 r268 255 255 } 256 256 } 257 258 /* Maybe read the MIME file259 */260 if (srv->mime_file != NULL) {261 if (srv->mime == NULL) {262 ret = cherokee_mime_new (&srv->mime);263 if (ret < ret_ok) {264 PRINT_ERROR_S ("Can not get default MIME configuration file\n");265 return ret;266 }267 }268 269 ret = cherokee_mime_load_mime_types (srv->mime, srv->mime_file);270 if (ret < ret_ok) {271 PRINT_ERROR ("Can not load MIME configuration file %s\n", srv->mime_file);272 return ret;273 }274 }275 257 #endif 276 258 cherokee/branches/0.5/cherokee/read_config_grammar.y
r228 r268 768 768 mime : T_MIME_FILE fulldir 769 769 { 770 SRV(server)->mime_file = $2; 770 ret_t ret; 771 772 if (SRV(server)->mime == NULL) { 773 ret = cherokee_mime_new (&SRV(server)->mime); 774 if (ret != ret_ok) { 775 PRINT_ERROR_S ("Can not get default MIME configuration file\n"); 776 return 1; 777 } 778 } 779 780 ret = cherokee_mime_load_mime_types (SRV(server)->mime, $2); 781 if (ret < ret_ok) { 782 PRINT_ERROR ("Can not load MIME configuration file %s\n", $2); 783 return 1; 784 } 771 785 }; 772 786 cherokee/branches/0.5/cherokee/server-protected.h
r166 r268 154 154 /* Mime 155 155 */ 156 char *mime_file;157 156 cherokee_mime_t *mime; 158 157 cherokee/branches/0.5/cherokee/server.c
r187 r268 117 117 /* Mime types 118 118 */ 119 n->mime_file = NULL;120 119 n->mime = NULL; 121 120 … … 319 318 /* Mime 320 319 */ 321 if (srv->mime_file != NULL) {322 free (srv->mime_file);323 srv->mime_file = NULL;324 }325 326 320 if (srv->mime != NULL) { 327 321 cherokee_mime_free (srv->mime);