src/server/daemon/location.c

changeset 702
ee80191310ca
parent 660
f00d03835dd9
equal deleted inserted replaced
701:936e5487418a 702:ee80191310ca
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) {

mercurial