src/server/daemon/location.c

changeset 652
dd90c858eb74
parent 651
ed74879c7041
equal deleted inserted replaced
651:ed74879c7041 652:dd90c858eb74
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) {

mercurial