| 224 } else if(loc->match == WS_LOCATION_MATCH_PREFIX) { |
224 } else if(loc->match == WS_LOCATION_MATCH_PREFIX) { |
| 225 return cx_strprefix(uri, loc->match_string); |
225 return cx_strprefix(uri, loc->match_string); |
| 226 } else { |
226 } else { |
| 227 return regexec(&loc->regex, uri.ptr, WS_LOCATION_NMATCH, match, 0) == 0; |
227 return regexec(&loc->regex, uri.ptr, WS_LOCATION_NMATCH, match, 0) == 0; |
| 228 } |
228 } |
| 229 return 0; |
|
| 230 } |
229 } |
| 231 |
230 |
| 232 WSLocationConfig* location_match_and_get_config(pool_handle_t *pool, Request *rq, cxstring uri, WSLocation *loc) { |
231 WSLocationConfig* location_match_and_get_config(pool_handle_t *pool, Request *rq, cxstring uri, WSLocation *loc) { |
| 233 WSLocationConfig *config = pool_malloc(pool, sizeof(WSLocationConfig)); |
232 WSLocationConfig *config = pool_malloc(pool, sizeof(WSLocationConfig)); |
| 234 if(!config) { |
233 if(!config) { |