diff options
| author | 2023-01-12 09:28:02 +0100 | |
|---|---|---|
| committer | 2023-01-12 09:28:02 +0100 | |
| commit | bb0d8f2a2755af5e11b46d32be84155ba71ea534 (patch) | |
| tree | 86eb998f66c875dc7d2d40ba3021a3e69ffe9400 /httpd.c | |
| parent | Show the More... link above the 'About this site'. (diff) | |
| download | snac2-bb0d8f2a2755af5e11b46d32be84155ba71ea534.tar.gz snac2-bb0d8f2a2755af5e11b46d32be84155ba71ea534.tar.xz snac2-bb0d8f2a2755af5e11b46d32be84155ba71ea534.zip | |
Backport from xs.
Diffstat (limited to 'httpd.c')
| -rw-r--r-- | httpd.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -160,11 +160,11 @@ void httpd_connection(FILE *f) | |||
| 160 | 160 | ||
| 161 | /* crop the q_path from leading / and the prefix */ | 161 | /* crop the q_path from leading / and the prefix */ |
| 162 | if (xs_endswith(q_path, "/")) | 162 | if (xs_endswith(q_path, "/")) |
| 163 | q_path = xs_crop(q_path, 0, -1); | 163 | q_path = xs_crop_i(q_path, 0, -1); |
| 164 | 164 | ||
| 165 | p = xs_dict_get(srv_config, "prefix"); | 165 | p = xs_dict_get(srv_config, "prefix"); |
| 166 | if (xs_startswith(q_path, p)) | 166 | if (xs_startswith(q_path, p)) |
| 167 | q_path = xs_crop(q_path, strlen(p), 0); | 167 | q_path = xs_crop_i(q_path, strlen(p), 0); |
| 168 | 168 | ||
| 169 | if (strcmp(method, "GET") == 0 || strcmp(method, "HEAD") == 0) { | 169 | if (strcmp(method, "GET") == 0 || strcmp(method, "HEAD") == 0) { |
| 170 | /* cascade through */ | 170 | /* cascade through */ |