| 222 if(loc->match == WS_LOCATION_MATCH_EXACT) { |
222 if(loc->match == WS_LOCATION_MATCH_EXACT) { |
| 223 return !cx_strcmp(loc->match_string, uri); |
223 return !cx_strcmp(loc->match_string, uri); |
| 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, 0, match, WS_LOCATION_NMATCH) == 0; |
227 return regexec(&loc->regex, uri.ptr, WS_LOCATION_NMATCH, match, 0) == 0; |
| 228 } |
228 } |
| 229 return 0; |
229 return 0; |
| 230 } |
230 } |
| 231 |
231 |
| 232 WSLocationConfig* location_match_and_get_config(pool_handle_t *pool, Request *rq, cxstring uri, WSLocation *loc) { |
232 WSLocationConfig* location_match_and_get_config(pool_handle_t *pool, Request *rq, cxstring uri, WSLocation *loc) { |