diff --git a/src/http_loop/http_loop.c b/src/http_loop/http_loop.c index d6c9539..e5c7d20 100644 --- a/src/http_loop/http_loop.c +++ b/src/http_loop/http_loop.c @@ -70,7 +70,7 @@ void http_loop_run(event_loop *el, int port) { if (route->type == http_route_regex) { regex_t *r = calloc(sizeof(regex_t), 1); - if (regcomp(r, route->path, 0) != 0) { + if (regcomp(r, route->path, REG_EXTENDED) != 0) { critical(1, "RegEx expression '%s' failed to compile", route->path); } diff --git a/src/lander/lander.c b/src/lander/lander.c index 5713c58..60ee83d 100644 --- a/src/lander/lander.c +++ b/src/lander/lander.c @@ -9,16 +9,16 @@ http_route lander_routes[] = { .steps = {lander_get_index, NULL}}, {.type = http_route_regex, .method = http_get, - .path = "^/\\([^/]\\+\\)$", + .path = "^/([^/]+)$", .steps = {lander_get_entry, NULL}}, {.type = http_route_regex, .method = http_post, - .path = "^/s\\(l\\?\\)/\\([^/]*\\)$", + .path = "^/s(l?)/([^/]*)$", .steps = {http_loop_step_auth, http_loop_step_body_to_buf, lander_post_redirect, NULL}}, {.type = http_route_regex, .method = http_post, - .path = "^/p\\(l\\?\\)/\\([^/]*\\)$", + .path = "^/p(l?)/([^/]*)$", .steps = {http_loop_step_auth, lander_post_paste, http_loop_step_body_to_file, http_loop_step_switch_res, NULL}}, };