add uh_split_header()
[project/uhttpd.git] / client.c
index e507995..6e75c5b 100644 (file)
--- a/client.c
+++ b/client.c
@@ -188,16 +188,10 @@ static int client_parse_header(struct client *cl, char *data)
                return CLIENT_STATE_DATA;
        }
 
-       val = strchr(data, ':');
+       val = uh_split_header(data);
        if (!val)
                return CLIENT_STATE_DONE;
 
-       *val = 0;
-       val++;
-
-       while (isspace(*val))
-               val++;
-
        for (name = data; *name; name++)
                if (isupper(*name))
                        *name = tolower(*name);