From e4f960ca74af4a89743bb5266423b13e3d1b6235 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 1 Jan 2013 21:46:12 +0100 Subject: add uh_split_header() --- utils.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'utils.c') 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; +} -- cgit v1.2.3