X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;f=client.c;h=483a1a400f8f38afea6acee1edd53ae414f9f33d;hb=e32b386174cc387d932800145383435083cf948a;hp=e50799528b438c514da0686cf68ffff9fdc6de9f;hpb=7333a14d21c474702376fbf0baa367d54448129a;p=project%2Fuhttpd.git diff --git a/client.c b/client.c index e507995..483a1a4 100644 --- a/client.c +++ b/client.c @@ -174,7 +174,7 @@ static bool client_init_cb(struct client *cl, char *buf, int len) static void client_header_complete(struct client *cl) { - uh_handle_file_request(cl); + uh_handle_request(cl); } static int client_parse_header(struct client *cl, char *data) @@ -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);