summaryrefslogtreecommitdiff
path: root/httpd.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2023-01-12 09:28:02 +0100
committerdefault <nobody@localhost>2023-01-12 09:28:02 +0100
commitbb0d8f2a2755af5e11b46d32be84155ba71ea534 (patch)
tree86eb998f66c875dc7d2d40ba3021a3e69ffe9400 /httpd.c
parent16be679ecdf12f5324f8778e4e03d21a84d4144f (diff)
Backport from xs.
Diffstat (limited to 'httpd.c')
-rw-r--r--httpd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/httpd.c b/httpd.c
index f85188c..52b4307 100644
--- a/httpd.c
+++ b/httpd.c
@@ -160,11 +160,11 @@ void httpd_connection(FILE *f)
/* crop the q_path from leading / and the prefix */
if (xs_endswith(q_path, "/"))
- q_path = xs_crop(q_path, 0, -1);
+ q_path = xs_crop_i(q_path, 0, -1);
p = xs_dict_get(srv_config, "prefix");
if (xs_startswith(q_path, p))
- q_path = xs_crop(q_path, strlen(p), 0);
+ q_path = xs_crop_i(q_path, strlen(p), 0);
if (strcmp(method, "GET") == 0 || strcmp(method, "HEAD") == 0) {
/* cascade through */