projects
/
project
/
uhttpd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
add uh_path_match()
[project/uhttpd.git]
/
utils.c
diff --git
a/utils.c
b/utils.c
index
847ff34
..
477296f
100644
(file)
--- a/
utils.c
+++ b/
utils.c
@@
-189,3
+189,13
@@
int uh_b64decode(char *buf, int blen, const unsigned char *src, int slen)
buf[len++] = 0;
return len;
}
+
+bool uh_path_match(const char *prefix, const char *url)
+{
+ int len = strlen(prefix);
+
+ if (strncmp(url, prefix, len) != 0)
+ return false;
+
+ return url[len] == '/' || url[len] == 0;
+}