Changeset 1714
- Timestamp:
- 08/02/08 20:09:12 (5 months ago)
- Files:
-
- cherokee/trunk/ChangeLog (modified) (1 diff)
- cherokee/trunk/cherokee/config_reader.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
cherokee/trunk/ChangeLog
r1712 r1714 1 2008-08-02 Alvaro Lopez Ortega <alvaro@alobbs.com> 2 3 * cherokee/config_reader.c (cherokee_config_reader_parse_string): 4 Fixes the change about forcing the properties to be lowcase. It 5 was a mistake, actually. There are certain entries that should be 6 written in uppercase such as environment variables. This patch 7 removes the lower-case restriction and adds a check to ensure that 8 there is not entry with the case name and different case as child 9 of the same configuration node. Eg: vserver!001!example and 10 vserver!001!Example. 11 1 12 2008-08-01 Taher Shihadeh <taher@unixwars.com> 2 13 cherokee/trunk/cherokee/config_reader.c
r1710 r1714 114 114 115 115 116 static ret_t 117 check_config_node_sanity (cherokee_config_node_t *conf) 118 { 119 cherokee_list_t *i, *j; 120 int re; 121 122 /* Finds duplicate properties written in lower/upper-case 123 */ 124 cherokee_config_node_foreach (i, conf) 125 { 126 cherokee_config_node_foreach (j, conf) 127 { 128 if (i == j) 129 continue; 130 131 re = cherokee_buffer_case_cmp_buf (&CONFIG_NODE(i)->key, 132 &CONFIG_NODE(j)->key); 133 if (re == 0) { 134 PRINT_ERROR ("ERROR: '%s' and '%s' as child of the same node.\n", 135 CONFIG_NODE(i)->key.buf, CONFIG_NODE(j)->key.buf); 136 return ret_error; 137 } 138 } 139 } 140 141 return ret_ok; 142 } 143 144 116 145 ret_t 117 146 cherokee_config_reader_parse_string (cherokee_config_node_t *conf, cherokee_buffer_t *buf) … … 169 198 while (*tmp == ' ') tmp--; 170 199 cherokee_buffer_add (&key, begin, (tmp + 1) - begin); 171 cherokee_buffer_to_lowcase (&key);172 200 173 201 tmp = equal + 3; … … 198 226 cherokee_buffer_mrproper (&key); 199 227 cherokee_buffer_mrproper (&val); 228 229 /* Sanity check 230 */ 231 ret = check_config_node_sanity (conf); 232 if (ret != ret_ok) 233 return ret; 234 200 235 return ret_ok; 201 236