src/server/daemon/location.c

changeset 637
85721a583f39
parent 636
40f069ddda37
child 640
a95045234b9b
equal deleted inserted replaced
636:40f069ddda37 637:85721a583f39
103 log_ereport(LOG_FAILURE, "Location directive must have 0-2 args"); 103 log_ereport(LOG_FAILURE, "Location directive must have 0-2 args");
104 return NULL; 104 return NULL;
105 } 105 }
106 106
107 WSLocation *location = cxZalloc(a, sizeof(WSLocation)); 107 WSLocation *location = cxZalloc(a, sizeof(WSLocation));
108 location->match = match;
108 location->match_string = cx_strdup_a((a), match_str); 109 location->match_string = cx_strdup_a((a), match_str);
109 110
110 if(match == WS_LOCATION_MATCH_CS_REGEX || match == WS_LOCATION_MATCH_CI_REGEX) { 111 if(match == WS_LOCATION_MATCH_CS_REGEX || match == WS_LOCATION_MATCH_CI_REGEX) {
111 if(regcomp(&location->regex, match_str.ptr, regex_flags)) { 112 if(regcomp(&location->regex, match_str.ptr, regex_flags)) {
112 log_ereport(LOG_FAILURE, "Location: cannot compile regex pattern %s", match_str.ptr); 113 log_ereport(LOG_FAILURE, "Location: cannot compile regex pattern %s", match_str.ptr);

mercurial