| 191 WSLocationConfig *config = pool_malloc(pool, sizeof(WSLocationConfig)); |
191 WSLocationConfig *config = pool_malloc(pool, sizeof(WSLocationConfig)); |
| 192 if(!config) { |
192 if(!config) { |
| 193 return NULL; |
193 return NULL; |
| 194 } |
194 } |
| 195 ZERO(config, sizeof(WSLocationConfig)); |
195 ZERO(config, sizeof(WSLocationConfig)); |
| |
196 for(int i=0;i<WS_LOCATION_NMATCH;i++) { |
| |
197 config->match[i].rm_so = -1; |
| |
198 config->match[i].rm_eo = -1; |
| |
199 } |
| 196 |
200 |
| 197 while(loc) { |
201 while(loc) { |
| 198 if(location_match(loc, uri, config->match)) { |
202 if(location_match(loc, uri, config->match)) { |
| 199 if(location_apply_config(config, loc)) { |
203 if(location_apply_config(config, loc)) { |
| 200 return NULL; |
204 return NULL; |