summaryrefslogtreecommitdiff
path: root/utils.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-01-01 21:46:12 +0100
committerFelix Fietkau <nbd@openwrt.org>2013-01-01 21:46:39 +0100
commite4f960ca74af4a89743bb5266423b13e3d1b6235 (patch)
tree6afad1045597d38630c520f8a8a215913d090f0c /utils.c
parent46cf4c79368daa556ed6936999ab05408f61da00 (diff)
add uh_split_header()
Diffstat (limited to 'utils.c')
-rw-r--r--utils.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/utils.c b/utils.c
index 477296f..e3de061 100644
--- a/utils.c
+++ b/utils.c
@@ -199,3 +199,20 @@ bool uh_path_match(const char *prefix, const char *url)
return url[len] == '/' || url[len] == 0;
}
+
+char *uh_split_header(char *str)
+{
+ char *val;
+
+ val = strchr(str, ':');
+ if (!val)
+ return NULL;
+
+ *val = 0;
+ val++;
+
+ while (isspace(*val))
+ val++;
+
+ return val;
+}