aboutsummaryrefslogtreecommitdiff
path: root/httpd.c
diff options
context:
space:
mode:
authorReyk Floeter <reyk@esdenera.com>2014-07-25 23:06:50 +0200
committerReyk Floeter <reyk@esdenera.com>2014-07-25 23:06:50 +0200
commite30ef12693dc3dcdf72573424c839afb10769b70 (patch)
treec24f3231a41a6b7e13372702217289775210e052 /httpd.c
parente3e992b54315a4d8e9bf446dab17ebde280903e1 (diff)
downloadhttpd-e30ef12693dc3dcdf72573424c839afb10769b70.tar.gz
httpd-e30ef12693dc3dcdf72573424c839afb10769b70.zip
sync
Diffstat (limited to 'httpd.c')
-rw-r--r--httpd.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/httpd.c b/httpd.c
index 22ae5f9..a1a8558 100644
--- a/httpd.c
+++ b/httpd.c
@@ -466,24 +466,15 @@ canonicalize_host(const char *host, char *name, size_t len)
}
const char *
-canonicalize_path(const char *root, const char *input, char *path, size_t len)
+canonicalize_path(const char *input, char *path, size_t len)
{
const char *i;
char *p, *start, *end;
- size_t n;
/* assuming input starts with '/' and is nul-terminated */
i = input;
p = path;
- /* prepend root directory, if specified */
- if (root != NULL) {
- if ((n = strlcpy(path, root, len)) >= len)
- return (NULL);
- len -= n;
- p += n;
- }
-
if (*input != '/' || len < 3)
return (NULL);